These errors....

This topic is 4527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

[Linker error] undefined reference to ChoosePixelFormat@8' [Linker error] undefined reference to SetPixelFormat@12' [Linker error] undefined reference to SwapBuffers@4' How do I fix those errors? They come up whenever I try to compile a program. Im using dev-cpp.

Share on other sites
Those errors mean you are not linking against the right library.

For example, undefined reference to ChoosePixelFormat@8' means your linker is looking for a function called 'ChoosePixelFormat' that takes 8 bytes of parameters. It searches through all the object files and libraries looking for the function, and the linker can't find it.

You need to tell the linker where to search for the function. It is probably in a library called opengl32.lib.

I don't use dev-cpp, so I don't know the details of doing it, nor the dev-c++ file locations. You might need to adjust your .lib search paths or otherwise make sure your configuration is correct.

Share on other sites
Quote:
 by http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_2qb8.aspChoosePixelFormat...Requirements Windows NT/2000: Requires Windows NT 3.5 or later. Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95. Header: Declared in wingdi.h. Import Library: Use gdi32.lib.

1. 1
2. 2
Rutin
22
3. 3
4. 4
frob
17
5. 5

• 33
• 13
• 12
• 10
• 12
• Forum Statistics

• Total Topics
632573
• Total Posts
3007140

×