Jump to content
  • Advertisement
Sign in to follow this  
laserdude45

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!