[IGSTK-Users] Building IGSTK 5.2 | Unresolved itk::MRCImageIOFactoryRegister__Private()
Frederic Perez
frederic.perez at alma3d.com
Wed Apr 24 07:06:05 EDT 2013
Hello again,
for completeness: today we've built binaries for Fedora, using GCC 4.7.2,
ITK 4.3.1 and VTK 5.10.1and experienced the same problem:
- undefined symbol itk::MRCImageIOFactoryRegister__Private(void) at
linking stage
Locally we have overcome this problem by adding *ITKReview* to the file
Source/CMakeLists.txt, line 535 (that is, added to the list in
TARGET_LINK_LIBRARIES).
Cheers, Frederic
On Mon, Apr 22, 2013 at 5:40 PM, Özgür Güler <ozgur_guler at gmx.at> wrote:
> Thanks for the error report and fix suggestion. We didn't try to compile
> IGSTK using MSV 2012 so far and I think it is more of an IDE issue, since
> the same configuration compiles fine with Visual Studio 2010 and 2008.
>
> Best,
> Ozgur
>
>
>
>
> 2013/4/22 Frederic Perez <frederic.perez at alma3d.com>
>
>> 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
>>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>>
>
>
>
> --
> *********************************************************************
> Dr. Dipl.-Ing. Özgür Güler, Bakk. techn. PhD
> Research Assistant
> 4D-Visualization Laboratory
> Univ. ENT Clinic
> Innsbruck Medical University
> Anichstr. 35, A-6020 Innsbruck, Austria
>
> tel.: +43 512 504 23428, fax.: +43 512 504 25231
>
> voxelmaster.eu
> www.gueler.at
> *********************************************************************
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20130424/bd792a08/attachment-0001.html>
More information about the IGSTK-Users
mailing list