I have a class that uses a DLL. I was wondering if I could compile the class into a .lib. I would just use it like it is but it requires me shutting of some of the options in MSVC++8.
Does anyone know how I could turn my .cpp into a .lib?
Printable View
I have a class that uses a DLL. I was wondering if I could compile the class into a .lib. I would just use it like it is but it requires me shutting of some of the options in MSVC++8.
Does anyone know how I could turn my .cpp into a .lib?
I'm learning C++, so this may not be the "most proper" implementation, but I think it should work:
That is, of course, for dynamic linked libraries, you should be able to use lib.exe to convert the necessary code to a static library ;)Code:extern "C" __declspec(dllexport)
/*your class here */
extern "C" __declspec(dllexport)
/* your methods here */
Additionally, MSDN has some stuff on it too.
Good luck!
Thank you!
Update:: That MSDN link did the trick!