Skip to main content
gamedev.net
🔒 Locked

These errors....

Started by laserdude45 Apr 28, 2006 at 4:06 PM 1 replies 1k views
Original Post
laserdude45
laserdude45
[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.
frob
frob
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.


In your linker options, add the library file name to the list.

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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.