From: Johan S. <jo...@if...> - 2005-09-16 18:15:33
|
Hi. I have now discovered how we must rig shallows to actually generate a prope= r=20 DLL out of it. With this setup scons creates both a shallows.dll and=20 shallows.lib file. See http://www.flounder.com/ultimateheaderfile.htm for a bit of background. Basically, every class and function declaration needs the following=20 prepended to its declaration when we are building shallows: class __declspec( dllexport ) Texture { ... }=20 When we are using shallows, they need the following declaration: class __declspec( dllimport ) Texture { ... } The trick is of course some macro magic in config.h: #ifdef COMPILING_SHALLOWS #define DllExport __declspec( dllexport ) #else #define DllExport __declspec( dllimport ) #endif And then add DllExport in front of every class and function declaration. class DllExport Texture { ... } I have a working copy of shallows with this enabled, but since it is a=20 rather large change, I would like to hear your opinions on this. (On Linux we of course always make the DllExport macro to be whitespace.) Is this okay for all of you? --=20 Help a man with his math problems and you get him off your back for a day. Teach a man math, and you scare him off for the rest of your life. Regards Johan Seland PhD Student Center of Mathematics for Applications University of Oslo |