-
July 3rd, 2006, 05:41 AM
#1
Junior Member
Making .libs!
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?
-
July 3rd, 2006, 07:16 AM
#2
Senior Member
I'm learning C++, so this may not be the "most proper" implementation, but I think it should work:
Code:
extern "C" __declspec(dllexport)
/*your class here */
extern "C" __declspec(dllexport)
/* your methods here */
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
Additionally, MSDN has some stuff on it too.
Good luck!
"The Texan turned out to be good-natured, generous and likeable. In three days no one could stand him." Catch 22 by Joseph Heller.
Buddies? I have no buddies...
Give the BSD daemon some love (proud FreeBSD user)
-
July 3rd, 2006, 04:46 PM
#3
Junior Member
Thank you!
Update:: That MSDN link did the trick!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|