[Insight-users] LINK error Qt4.8 + ITK4.2: multiple definitions

Yixun Liu yxliuwm at gmail.com
Sun Aug 19 13:31:27 EDT 2012


Hi All,
I got a link error when using Qt4.8, ITK4.2 on Windows XP 64Bit, MSVC2005-64bit.
Both  Qt and ITK4.2 are compiled into 64 Bit.

Build Qt (in MSVC2005 64Bit command prompt):
configure -static -platform win32-msvc2005
nmake

Build MyProject:
In my project, the CMakeList is:

...
# Find ITK
FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)


# Find Qt
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})


TARGET_LINK_LIBRARIES(MyProject ${ITK_LIBRARIES}  ${QT_LIBRARIES}  )
...


The link errors are:

1>itktiff-4.2.lib(tif_aux.obj) : warning LNK4006: _TIFFCheckRealloc
already defined in QtGuid.lib(tif_aux.obj); second definition ignored

1>itktiff-4.2.lib(tif_dirwrite.obj) : warning LNK4006:
TIFFWriteCustomDirectory already defined in
QtGuid.lib(tif_dirwrite.obj); second definition ignored



Now I use /FORCE:MULTIPLE to hide the error, but I want to resolve it
rather than hiding it.



Thank you.

Yixun


More information about the Insight-users mailing list