Jump to content
  • Advertisement

Archived

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

Scraniel

How do I include library files? (not header files)

This topic is 6071 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 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~

Share this post


Link to post
Share on other sites
Advertisement
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.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!