[vtkusers] Auto-initialisation of Object Factories on Win32

Craig Henderson craig.henderson at intelligentultrasound.com
Fri Oct 19 11:36:15 EDT 2012


Hi, I have been searching for a way to enable Auto-initialisation of Object
Factories on Windows (MSVC), but without success. Most calls to
Object::New() are returning null pointers and stepping through the code I
can see the factory is missing.

 

To prove the case, I added this block to my code, and New() worked for
vtkRenderingOpenGL.

 

_declspec(dllimport) void vtkRenderingOpenGL_AutoInit_Construct();

vtkRenderingOpenGL_AutoInit_Construct();

 

I guess there's a simple compiler option when building VTK, but cannot find
it anywhere.

 

Thanks for your help

-- Craig

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121019/fbc08347/attachment.htm>


More information about the vtkusers mailing list