Jump to content
  • Advertisement
Sign in to follow this  
dave

A Problem Including My Own Static Library

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

Ok so i wrote a class with a few simple functions, put it in the static library project, compiled, found the .lib file, moved it into a folder on the C drive, included the library file in the project settings of a simple console project i set up, add the folder to the directories bit of IDE settings, linked the test project and th library cant be found. any ideas ace

Share this post


Link to post
Share on other sites
Advertisement
OK so it was s tupid mistake,

so now the lib works but i dont know how i access the functions,

ace

Share this post


Link to post
Share on other sites
Include the header that they are defined in and link w/ the lib and you should be able to use it just like you're linking directly to the code.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
U need to write a header file and declare all the functions and stuff u want to use then just include it in your program

Share this post


Link to post
Share on other sites
so i could just write a single header file that includes the headers for the classes, then would all functions in teh classes be made available to me.

ace

Share this post


Link to post
Share on other sites
I don't know how to import classes, but I know how to import single functions:
__declspec( dllimport ) int Add( int a, int b );

Maybe if you'd experiment with it, it will work with classes. :)

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!