How do I include library files? (not header files)
I know to include a header file, i type #include , but what is the syntax for a library file such as file.lib? Thanks a lot.
~Scraniel~
In MSVC go to Project->Settings->Link and add it to the text box. In a GCC derivative use -llibname.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
With MSVC, you can use
#pragma comment(lib, "library name")
which will tell the compiler to attempt to link the library. N&V's method is the preferred way, but placing this code inside the header for a library you're writing can be convenient. GLUT uses this technique.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement