Sign in to follow this  

A Problem Including My Own Static Library

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

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