A Problem Including My Own Static Library
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
OK so it was s tupid mistake,
so now the lib works but i dont know how i access the functions,
ace
so now the lib works but i dont know how i access the functions,
ace
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.
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
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
ace
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. :)
__declspec( dllimport ) int Add( int a, int b );
Maybe if you'd experiment with it, it will work with classes. :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement