Sign in to follow this  

How to link libraries in VC++ 2005 Express

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

This topic is 4197 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this