[IGSTK-Users] Building IGSTK 5.2 | Unresolved itk::MRCImageIOFactoryRegister__Private()
Frederic Perez
frederic.perez at alma3d.com
Mon Apr 22 10:54:04 EDT 2013
Hello again,
we have found out that adding the ITKReview-4.3.lib library to the
Properties > "Additional Dependencies" for both the igstkTests and
igstkStateMachineExportTest projects solves this issue.
We bet this should be tackled at a CMake level, by editing the appropriate
CMakeLists.txt file to include this "ITKReview" library (maybe using
${ITK_LIBRARIES}?).
Best, Frederic
On Mon, Apr 22, 2013 at 3:39 PM, Frederic Perez
<frederic.perez at alma3d.com>wrote:
> Hello igstk-users,
>
> I've tried to build binaries for IGSTK 5.2 for Visual Studio 2012, knowing
> its requirements from
>
> http://public.kitware.com/IGSTKWIKI/index.php/Download_IGSTK#IGSTK_5.2_Requirements
>
> Concretely, I'm using as base libraries ITK 4.3.1 ("ITK 4.2.0 or later ")
> and VTK 5.10.1 ("VTK 5.10.0 or later") generating .sln solutions with CMake
> 2.8.10.2 ("CMake 2.8 or later").
>
> Unfortunately I get error messages at the linking stage, such as
> 2> Creating library
> C:/bin/igstk/5.2/11-d-b/bin/Debug/igstkStateMachineExportTest.lib and
> object C:/bin/igstk/5.2/11-d-b/bin/Debug/igstkStateMachineExportTest.exp
> 2>IGSTK.lib(igstkMRImageSpatialObjectRepresentation.obj) : error LNK2001:
> unresolved external symbol "void *cdecl itk::MRCImageIOFactoryRegister*Private(void)"
> (?MRCImageIOFactoryRegister__Private at itk@@YAXXZ)
>
> Browsing the ITK source files I found the problematic function In
> itkMRCImageIOFactory.cxx, in case this helps:
>
> // Undocumented API used to register during static initialization.
> // DO NOT CALL DIRECTLY.
>
> static bool MRCImageIOFactoryHasBeenRegistered;
>
> void MRCImageIOFactoryRegister__Private(void)
> {
> if( ! MRCImageIOFactoryHasBeenRegistered )
> {
> MRCImageIOFactoryHasBeenRegistered = true;
> MRCImageIOFactory::RegisterOneFactory();
> }
> }
>
> Thanks for any feedback,
>
> Frederic
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20130422/b8975cb6/attachment.html>
More information about the IGSTK-Users
mailing list