|
From: | Simon Smith |
Subject: | Re: [Openexr-devel] Strange issue with half and _toFloat array. |
Date: | Thu, 13 Feb 2014 15:50:16 +0000 |
After looking at the comments in createDLL.cpp, I wonder if this is the problem? ---------------------- Extra Magic: static member variables This program does not fix the problem that the MS dynamic loader can't resolve static member variables of classes properly. This issue will be the most important thing to watch out for. example - class Foo { public: static int bar; }; the dynamic loader puts bar in the wrong memory space. This is a fundamental problem with the architecture of DLL's. There is no workaround, except to change the code; example, in the header file - #ifdef MSC_VER extern __declspec(dllexport) int foo_bar; #endif and in the .cpp file, #ifdef MSC_VER __declspec(dllexport) int foo_bar; #endif You'll get multiple declarations of foo_bar, but the linker will resolve them down to one when the DLL is linked. ---------------------- If this is relevant, anyone any ideas how to solve it? I could just move to using statically linked libraries of course I guess ….. Best Regards, On 13 Feb 2014, at 15:34, Simon Smith wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |