Jump to content
  • Advertisement
Sign in to follow this  
K A Z E

How to link libraries in VC++ 2005 Express

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

I just got VC++ 2005 Express Edition because my old compiler (VC++ 6.0 Introductory Edition) puts an annoying message box at the start of every program I compile in it reminding me that I can't redistribute my programs blah blah... Anyway, I'm trying to compile an OpenGL program. I used to go to Project->Settings and click on the links tab, then add opengl32.lib glu32.lib glaux.lib. Well. There's a "project->project_name properties..." button in VC++ 2005 but I can't really find where to link libs in it. So how do I link libs in VC++ 2005 Express? Also I think I vaguely remember there being a keyword for linking libs although I can't remember it (or am I just dreaming that up?). Either one or preferably both would be good. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I'm not at my IDE, so this is just approximate Project->Linker->Input

Otherwise, I like to use the macro approach, as it documents itself in the code:
#ifdef WIN32
#pragma comment(lib, "libname.lib")
#endif

Share this post


Link to post
Share on other sites
It should be in project settings; under the linker folder there should be an entry called input. From there add your libraries to the additional dependencies line. You can also add the libraries to your project source files like a regular external source file.

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!