Hey people,
im learning through Nehe tutorials and I need to add that glaux library to my project.
How do I do that in VS?
sorry for that noobie question, plz don't start bedevil me..
Hey people,
im learning through Nehe tutorials and I need to add that glaux library to my project.
How do I do that in VS?
sorry for that noobie question, plz don't start bedevil me..
You will need to setup the library directory (project->properties->configuration properties->vc++ directories) if glaux is not in a directory already accessible by the project, as well as the add the library as an additional dependency (project->properties->configuration properties->linker->input) If you are compiling glaux, you can add that project to the existing solution, and use project->properties->common properties->add new reference instead.
If you are including files such as headers, you may need to setup those as well, either as an include from vc++ directories, or through c/c++->general->additional include directories.
the above applies to vs2010, but should work in 2013 unless everything has been changed again.
My favorite method is by using the #pragma comment, ex:
#pragma comment(lib, "LibraryName.lib")
Of course, you have to add the library path in "project->properties->configuration properties->linker->General->Additional Library path"
Same thing for headers, in "project->properties->configuration properties->c/c++->General->Additional include directories"
Important to note when using Burnt_Fyr solution, it you probably want to go to the drop down box at the top and set the configuration to All Release, otherwise it could fail when you build the release version. You don't have to do this, but it makes it easier as you don't have to manually add the libraries to all the configurations.
Ok, who's the idiot who keep downvoting me and don't have the balls to tell why??? The information i provided is 100% accurate and lots of people do it that way i dont see why i should get downvoted for this. Last week i got downvoted for a post i posted in march... cmon.
Ok, who's the idiot who keep downvoting me and don't have the balls to tell why??? The information i provided is 100% accurate and lots of people do it that way i dont see why i should get downvoted for this. Last week i got downvoted for a post i posted in march... cmon.
Maybe because it was compiler specific. I upvoted anyway since he specifically asked for VS solution.
My favorite method is by using the #pragma comment, ex:
#pragma comment(lib, "LibraryName.lib")
I do like the idea of the #pragma solution since for example if you use the GLUT_STATIC or GLEW_STATIC define then the #pragma can be put in the correct #ifdef and link against the static version of the library (glut_static.lib) rather than the dynamic version. This means that you do not need to worry about the linker and build system becoming unsynced with the code.
However since I always try to write the most portable code I can, I guess I will never use it until 99% of compilers (especially on UNIX) support this type of linking ;)
Ok, who's the idiot who keep downvoting me and don't have the balls to tell why??? The information i provided is 100% accurate and lots of people do it that way i dont see why i should get downvoted for this. Last week i got downvoted for a post i posted in march... cmon.
I feel your pain, it seems silly to be punished for a valid answer. #pragma comment may be VS specific, but so was my answer.
Important to note when using Burnt_Fyr solution, it you probably want to go to the drop down box at the top and set the configuration to All Release, otherwise it could fail when you build the release version. You don't have to do this, but it makes it easier as you don't have to manually add the libraries to all the configurations.
I didn't advise this, as OP may have different dependencies for debug and release. My own code is broken into several libraries, and each has a separate debug/release config, so when I'm including that library in a debug configuration, I want the debug config of that library, which may have sanity checks or evil helper functions for quick and dirty testing, that I shouldn't rely on in release versions. When I'm compiling a release, I use the stripped down release versions of my libraries.