BioMedIA / MIRTK

The Medical Image Registration ToolKit (MIRTK), the successor of the IRTK, contains common CMake build configuration files, core libraries, and basic command-line tools. Extension packages are hosted by the MIRTK GitHub group at
https://github.com/MIRTK
Apache License 2.0
184 stars 71 forks source link

Object factories not initialised when using DLLs on Windows #162

Closed schuhschuh closed 8 years ago

schuhschuh commented 8 years ago

The build of the DLLs on Windows works fine, however, the object factories are not initialised properly. Maybe the Initialize<Module>Library function should be called from a DllMain function?

schuhschuh commented 8 years ago

The issue doesn't seem to be that the types are not being registered. Maybe it is rather some kind of a DLL boundary issue. The energy term types registered by the Transformation library are available, but those from the Registration and Deformable libraries are missing. Also, the IO classes of the IO library are correctly registered as well. Note that the object factory class is part of the Transformation library...

schuhschuh commented 8 years ago

The issue should be caused by this: http://stackoverflow.com/questions/21333935/using-a-singleton-across-dll-boundary