From: Ben <lgp...@16...> - 2008-04-16 00:51:09
|
Hi Markus and all: > I have a question: can we make the library zeitgeist, kerosin, oxygen > as dll in windows? >However on windows only symbols >(i.e. function names and members) that are explicitly declared are >exported (i.e. visible from outside the .dll). So declaring all required >symbols as DLL-Export is quite a lot of work. Yes, it's really a lot of work, however, I make one avaible here[1]. I use '#define SHARED_LIB_COMPILE' in 'windows/sparkconfig.h', add 'CLASS_EXPORT' before all the classes needed, and It works. There is only one technical issue: when there is a static member in a class(to be export), for example, in salt::Matrix (mIdentity), salt.dll is produced, but when zeitgeist links to salt, there is a unresovled symbol of 'mIdentity'. I have to add an additional file like this to define it: #include <salt/matrix.h> using namespace salt; float Matrix::mIdentity[16]= { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 }; Is there any other solution? Best wishes! Ben [1] www.apollo3d.cn/download/winserver_dll.rar |