Re: [Insight-users] Compile error with mingw
Tomáš Kazmar
Tomash.Kazmar at seznam.cz
Thu Jun 7 16:49:46 EDT 2007
Hi Nic,
it seems that building ITK with mingw is somehow broken
by now. I have similar setup ITK 2.8.0, gcc 3.4.2, runtime 3.9,
w32api 3.6, mingw-makefiles and I get exactly the same error.
I found a workaround which is not elegant but works. Because
only symbols from SmartPointerForwardReference are missing,
I include itkSmartPointerForwardReference.txx from every
executable target as it is advised in the header file
itkSmartPointerForwardReference.h.
Question is why this linking error happens at all because all
relevant symbols are in libITKCommon.dll (according to
"nm libITKCommon.dll") which is included in linking. It seems
that explicitly for this purpose there is a
itkSmartPointerForwardReferenceProcessObject.cxx file which
is added to list of sources used to create that dll.
If anybody finds out what causes it, please let me know. Until
then we can use that ugly workaround.
Regards,
Tomas
# ------------ Původní zpráva ------------
# Od: Nicolaus Andratschke <koegli at yahoo.com>
# Předmět: [Insight-users] Compile error with mingw
# Datum: 28.5.2007 12:16:05
# ----------------------------------------
# I'm havinf trouble compiling CVS version of ITK.
# I use mingw 3.4.4, runtime 3.12, w32api 3.9, msys 1.10
# and turned msys-Generation on.
#
# Half way through I get the error message below.
# Has anybody an idea what's wrong?
#
# NIC
#
# Scanning dependencies of target itkTestDriver
# [ 51%] Building CXX object
# Code/IO/CMakeFiles/itkTestDriver.dir/itkTestDriver.ob
# j
#
# Linking CXX executable ../../bin/itkTestDriver.exe
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk1
#
# 5ImageFileWriterINS_5ImageIhLj2EEEE5WriteEv[itk::ImageFileWriter<itk::Image<unsi
# gned char, 2u> >::Write()]+0xd12): undefined
# reference to `itk::SmartPointerForw
# ardReference<itk::ProcessObject>::operator
# itk::ProcessObject*() const'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk1
#
# 5ImageFileWriterINS_5ImageIhLj2EEEE5WriteEv[itk::ImageFileWriter<itk::Image<unsi
# gned char, 2u> >::Write()]+0xd31): undefined
# reference to `itk::SmartPointerForw
# ardReference<itk::ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk1
#
# 5ImageFileWriterINS_5ImageIhLj2EEEE5WriteEv[itk::ImageFileWriter<itk::Image<unsi
# gned char, 2u> >::Write()]+0x14d8): undefined
# reference to `itk::SmartPointerFor
# wardReference<itk::ProcessObject>::operator->() const'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk1
#
# 5ImageFileWriterINS_5ImageIhLj2EEEE5WriteEv[itk::ImageFileWriter<itk::Image<unsi
# gned char, 2u> >::Write()]+0x14f9): undefined
# reference to `itk::SmartPointerFor
# wardReference<itk::ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk1
#
# 5ImageFileWriterINS_5ImageIhLj2EEEE5WriteEv[itk::ImageFileWriter<itk::Image<unsi
# gned char, 2u> >::Write()]+0x15ec): undefined
# reference to `itk::SmartPointerFor
# wardReference<itk::ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj2EE23UpdateOutputInformationEv[itk::ImageBase<2u>::UpdateOutputInfor
# mation()]+0x64): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::operator itk::ProcessObject*() const'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj2EE23UpdateOutputInformationEv[itk::ImageBase<2u>::UpdateOutputInfor
# mation()]+0x79): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj2EE23UpdateOutputInformationEv[itk::ImageBase<2u>::UpdateOutputInfor
# mation()]+0xac): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::operator->() const'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj2EE23UpdateOutputInformationEv[itk::ImageBase<2u>::UpdateOutputInfor
# mation()]+0xc6): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj2EE23UpdateOutputInformationEv[itk::ImageBase<2u>::UpdateOutputInfor
# mation()]+0x175): undefined reference to
# `itk::SmartPointerForwardReference<itk:
# :ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj2EE23UpdateOutputInformationEv[itk::ImageBase<2u>::UpdateOutputInfor
# mation()]+0x19e): undefined reference to
# `itk::SmartPointerForwardReference<itk:
# :ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj6EE23UpdateOutputInformationEv[itk::ImageBase<6u>::UpdateOutputInfor
# mation()]+0x64): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::operator itk::ProcessObject*() const'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj6EE23UpdateOutputInformationEv[itk::ImageBase<6u>::UpdateOutputInfor
# mation()]+0x79): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj6EE23UpdateOutputInformationEv[itk::ImageBase<6u>::UpdateOutputInfor
# mation()]+0xac): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::operator->() const'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj6EE23UpdateOutputInformationEv[itk::ImageBase<6u>::UpdateOutputInfor
# mation()]+0xc6): undefined reference to
# `itk::SmartPointerForwardReference<itk::
# ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj6EE23UpdateOutputInformationEv[itk::ImageBase<6u>::UpdateOutputInfor
# mation()]+0x175): undefined reference to
# `itk::SmartPointerForwardReference<itk:
# :ProcessObject>::~SmartPointerForwardReference()'
# CMakeFiles/itkTestDriver.dir/itkTestDriver.obj:itkTestDriver.cxx:(.text$_ZN3itk9
#
# ImageBaseILj6EE23UpdateOutputInformationEv[itk::ImageBase<6u>::UpdateOutputInfor
# mation()]+0x19e): undefined reference to
# `itk::SmartPointerForwardReference<itk:
# :ProcessObject>::~SmartPointerForwardReference()'
# collect2: ld returned 1 exit status
# make[2]: *** [bin/itkTestDriver.exe] Error 1
# make[1]: ***
# [Code/IO/CMakeFiles/itkTestDriver.dir/all] Error 2
# make: *** [all] Error 2
#
#
#
# ____________________________________________________________________________________Get
# the free Yahoo! toolbar and rest assured with the added security of spyware
# protection.
# http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
# _______________________________________________
# Insight-users mailing list
# Insight-users at itk.org
# http://www.itk.org/mailman/listinfo/insight-users
#
#
#
More information about the Insight-users
mailing list