RE: [GD-General] Sharing DSP between static lib / DLL
Brought to you by:
vexxed72
From: Nicolas R. <nic...@fr...> - 2003-01-14 14:55:33
|
Hi, This is what we do here: Let say that we have a "MyLib". First the static library: We have first a "MyLib.h" header which is: including all headers of the library. We have a "MyLibDefines.h" header which is included by all headers of the library, and starts with: #ifndef MYLIB_API #define MYLIB_API #endif Then all public functions/classes are using MYLIB_API declaration. The DLL project. Only two files (usually in same directoy as MyLib) MyLibDLL.cpp which is only doing: #define MYLIB_API __declspec(dllexport) #include "MyLibDLL.h" And MyLibDLL.h: #ifndef MYLIB_API #define MYLIB_API __declspec(dllimport) #endif #include "MyLib.h" In outer project, when using the DLL, we just include "MyLibDLL.h". When using the static lib, we include "MyLib.h" Nicolas. -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Pierre Terdiman Sent: Monday, January 13, 2003 12:42 PM To: gam...@li... Subject: [GD-General] Sharing DSP between static lib / DLL Hi, I would like to have two versions of the same library : - a static version (simple .lib) - a dynamic version (a .dll) This is easy enough by creating two projects (.dsp) and #defining appropriate tokens. But the original DLL project has a particular source-tree (in VC++), that seems to be saved in its DSP file. Is there a way to somehow copy that source tree to the other DSP (from the lib version), without recreating everything in VC++ ? More important, how to easily keep both in sync ? (the same problem arises with project settings, if I change them in one version (say using RTTI or not), I'd like the other version to use the same settings automatically...) I'm afraid it's not possible, but it's worth asking. Pierre ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=557 |