need to create a LIB file ...(and .dlls)

Started by
3 comments, last by wendigo23 18 years, 9 months ago
hey all i have a set of .h and their accompanying .cpp files that i wish to make into a .lib. how would i go about doing this? while we are at it a .dll too.. thanks!!
heh
Advertisement
Which IDE are you using?

Usually when you start a project there will be an option for making a DLL project.
Gary.Goodbye, and thanks for all the fish.
yeah i am using MSVC 6.

i guess i was wondering if you choose New->projects->win32 dynamic link library , will this also create the .lib file too?

***it looks like i was rated down for asking this question..wow what a rating system we have,,
heh
Same things happenned to me in the past, but hey they're only numbers.

Anyhow. MSVC shoud create all the files you'll need to use and build your .DLL, including a .lib. You'll have to do some giggery pokery with the classes/functions you want to have available in the .dll.

Not too sure about MSVC but with DEV-C++ I had to have the following:

#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */

class DLLIMPORT yourClass
{
};

on all the classes I wanted available in the DLL. I passed the BUILDING_DLL as a parameter in the makefile -DBUILDING_DLL=1.

You'll have to do somethign similar I suspect.

Good luck..:)

Rated you up...don't know if it'll help your cause much though..:)
Gary.Goodbye, and thanks for all the fish.
I believe it is the same for MSVC.

This topic is closed to new replies.

Advertisement