[Insight-users] Linking ITK 2.4.1 to an application and GDCM related errors

Stefan Wesarg stefan.wesarg at igd.fraunhofer.de
Thu Feb 9 10:07:43 EST 2006


Hi Mathieu,

The problem we had was related to the <snmpapi.lib>, as you presumed. 
This library has not been added to our project and therefore not been 
linked to our code. :-(
Now we also link against this library, and everything works fine. Thanks 
a lot for your hints!

Stefan

Mathieu Malaterre schrieb:
> Stefan Wesarg wrote:
>> Hello,
>>
>> We have our own application that uses ITK functionality. Currently we 
>> are upgrading the ITK part from 2.0.1 to 2.4.1. Up to now everything 
>> worked fine with the old 2.0.1 version. Linking against the new 2.4.1 
>> libraries results in an unresolved external linker error related to 
>> the GDCM library:
>>
>>> itkgdcm.lib(gdcmUtil.obj) : error LNK2001: unresolved external 
>>> symbol _SnmpUtilVarBindFree at 4
>>> itkgdcm.lib(gdcmUtil.obj) : error LNK2001: unresolved external 
>>> symbol _SnmpUtilOidNCmp at 12
>>> itkgdcm.lib(gdcmUtil.obj) : error LNK2001: unresolved external 
>>> symbol _SnmpUtilOidCpy at 8
>>
>>
>> However, we are not using GDCM explicitely. All stuff that is DICOM 
>> related and that we are using is related to these classes:
>>
>>> #include <itkDICOMSeriesFileNames.h>
>>> #include <itkDICOMImageIO.h>
>>> #include <itkDICOMImageIO2.h>
>>
>>
>> Can anybody give me some hints what the problem could be? How GDCM 
>> comes into play if we do not use that functionality?
>
> That's magic ;)
> Simply because the API of itkGDCM was updated to match the one from 
> itkDICOM and then all you need is make itkDICOM an empty subclass of 
> itkGDCM.
>
> As for your linker error, indeed GDCM needs some functionalities from 
> snmpapi to access the IP address of the machine (I always wanted to 
> rewrite this code but never got a chance doing it). Anyway the link 
> should be done properly. By any chance are you reusing an old binary 
> tree, with a different source tree ? If so could you please try again 
> in a fresh new build tree ?
>
>
> $ grep -3 snmp Utilities/gdcm/src/CMakeLists.txt
>           IF(WIN32)
>   IF(NOT BORLAND)
>     TARGET_LINK_LIBRARIES(itkgdcm wsock32 snmpapi)
>   ENDIF(NOT BORLAND)
> ENDIF(WIN32)
>
>
>> Our configuration:
>> OS: Win XP, Prof.
>> Compiler: Visual C++ 6
>> other toolkits used: VTK 4.4 and wxWidgets 2.4.2
>                                    ^^^^^^^^ nice :)
>
> Mathieu

-- 
---------------------------------------------------------------------
Dipl.-Phys. Stefan Wesarg

Fraunhofer Institute for Computer Graphics
Cognitive Computing and Medical Imaging (A7)
Fraunhoferstr. 5, 64283 Darmstadt, Germany
---------------------------------------------------------------------
email:	stefan.wesarg at igd.fraunhofer.de
http://a7www.igd.fhg.de/persons/swesarg/swesarg.html

phone:	+49 6151 - 155 511
fax:	+49 6151 - 155 480
---------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3750 bytes
Desc: S/MIME Cryptographic Signature
Url : http://public.kitware.com/pipermail/insight-users/attachments/20060209/3666eb92/smime.bin


More information about the Insight-users mailing list