Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

blueboycurtis

OpenGL How do you get the OpenGL libs linked when building in Visual C++?

This topic is 6117 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

Hello, I am not new to programming, I do it for a living -- however, I have been using mostly web technologies, java, and straight C++. I AM new to OpenGL and to Microsoft programming. So I am having some real difficulties. My main concern is this: I have an OpenGL game programming book (written by the CEO and COO of GameDev.net) and it conveniently shows how to write a simple windows WGL program to use OpenGL -- but doesn''t really mention the intricacies involved. (I guess they assume you know Visual C++ well. Oops) Anyways, I need to know about what I wrote in the subject email: when I go to BUILD my .CPP file, it gives me many errors regarding UNRESOLVED EXTERNAL SYMBOL for all of the openGL stuff. I KNOW this has to do with linking (otherwise the stuff compiles fine) ... anyone know how to deal with this? Also, if you know of a good crash course online in general for linking and building Win32 / MFC / etc programs, let me know. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Go to "Project"->"Settings", and select the "General" category under the "Link" tab. There in the "Object/Library modules" text-box you add "opengl32.lib" and "glu32.lib"

(Sorry if it was to detailed )

Share this post


Link to post
Share on other sites
Ok, umm... thanks for the info with linking libraries for projects in Visual C++. However, I still get a message about "unresolved external symbol _main"

I assume this has to do with my use of
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)


Is there another standard windows library that I need to link? The books make no mention of this (I have two Visual C++ books and two game programming books and they all conveniently IGNORE library linking!!)

Share this post


Link to post
Share on other sites
Hi,
You have choose the wrong Project. You choose Win32-Consoleapplication but you need Win32-Application.

Bye

Punika

Share this post


Link to post
Share on other sites

  • 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!