[Insight-users] still Linking error in examples

庄吓海(Xiahai Zhuang) arhye at 163.com
Sun Aug 28 20:42:45 EDT 2005


Luis Ibanez,您好!

All ITK,VTK,itkvtkApplication, are built long ago.
I don't know what their versions are exactly.
I found some info from the source file
ITK6:
	/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile: CodeCopyright.txt,v $
  Language:  C++
  Date:      $Date: 2003/09/10 14:29:50 $
  Version:   $Revision: 1.2 $

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
 VTK4.2:
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    $RCSfile: Copyright.txt,v $
  Language:  C++
  Date:      $Date: 2002/01/21 20:57:29 $
  Version:   $Revision: 1.1 $
***************************

now my python version is python2.3
When built the itk, vtk, we used CMake1.8
but now, I use CMake2.0
Is that a problem, should I reuse CMake1.8, or rebuilt the whole system includingITK,vtk,itkvtkapplication

Thank you!

======= 2005-08-28 10:42:00 您在来信中写道:=======

>Hi Xiahai
>
>
>What version of ITK are you using ?
>
>
>  Luis
>
>
>-------------------------------
>庄吓海(Xiahai Zhuang) wrote:
>> Dear Luis Ibanez,
>>      Thank you for your reply. Now, I have tried in the same mode. But the linking error still there.
>> The example should have be configured by CMake because I used CMake to configure itk when building ITK,
>> at that time I also built those examples included in ITK.
>>      
>>      Best Regards
>>  
>>                                                                           Zhuang,Xiahai
>> 
>>       --------------------Configuration: ImageRegistration4 - Win32 Release--------------------
>> Building Custom Rule E:\ITK6\Examples\Registration\CMakeLists.txt
>> -- Check for working C compiler: cl -- works
>> -- Check for working CXX compiler: cl -- works
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to: E:/bin/itkvtk
>> Linking...
>>    Creating library E:\bin\itkvtk\bin\Release/ImageRegistration4.lib and object E:\bin\itkvtk\bin\Release/ImageRegistration4.exp
>> ImageRegistration4.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall itk::ProcessObject::GetNumberOfValidRequiredInputs(void)const " (?GetNumberOfValidRequiredInputs at ProcessObject@itk@@UBEIXZ)
>> ImageRegistration4.obj : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall itk::ImageIOBase::GetComponentTypeAsString(enum itk::ImageIOBase::IOCompon
>> entType)const " (?GetComponentTypeAsString at ImageIOBase@itk@@QBE?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@W4IOComponentType at 12@@Z)
>> E:\bin\itkvtk\bin\Release/ImageRegistration4.exe : fatal error LNK1120: 2 unresolved externals
>> Error executing link.exe.
>> 
>> ImageRegistration4.exe - 3 error(s), 0 warning(s)
>> 
>> 	
>> 
>> ======= 2005-08-25 12:16:00 您在来信中写道:=======
>> 
>> 
>>>HI Xiahai,
>>>
>>>You are mixing builds from Debug mode with Release mode.
>>>This is what the following error message tells you:
>>>
>>>
>>>"LINK : warning LNK4098:
>>>"defaultlib "MSVCRT" conflicts with use of other libs"
>>>
>>>
>>>Please use a single compilation mode for the entire system.
>>>
>>>
>>>It looks like you are not using CMake for configuring
>>>your system.... CMake would have prevented such conflicts.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>>    Luis
>>>
>>>
>>>----------------------------
>>>庄吓海(Xiahai Zhuang) wrote:
>>>
>>>> 
>>>>	----------------Configuration: ImageRegistration4 - Win32 Debug--------------------
>>>>Compiling...
>>>>ImageRegistration4.cxx
>>>>Linking...
>>>>   Creating library E:\bin\itkvtk\bin\Debug/ImageRegistration4.lib and object E:\bin\itkvtk\bin\Debug/ImageRegistration4.exp
>>>>LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
>>>>ImageRegistration4.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall itk::ProcessObject::GetNumberOfValidRequiredInputs(void)const " (?GetNumberOfValidRequiredInputs at ProcessObject@itk@@UBEIXZ)
>>>>ImageRegistration4.obj : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall itk::ImageIOBase::GetComponentTypeAsString(enum itk::ImageIOBase::IOCompon
>>>>entType)const " (?GetComponentTypeAsString at ImageIOBase@itk@@QBE?AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@W4IOComponentType at 12@@Z)
>>>>E:\bin\itkvtk\bin\Debug/ImageRegistration4.exe : fatal error LNK1120: 2 unresolved externals
>>>>Error executing link.exe.
>>>>
>>>>ImageRegistration4.exe - 3 error(s), 1 warning(s)
>>>>
>>>>//////////////////////////////////////////////////////////////////
>>>>  any time I built an example, the compiling is OK, but when it comes to link, it comes out such errors.
>>>>could anyone so kind to help me out. thanks!!!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>		
>>>>
>>>>        致
>>>>礼!
>>>> 
>>>>				 
>>>>        庄吓海(Xiahai Zhuang)
>>>>        arhye at 163.com
>>>>          2005-08-25
>>>>
>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>Insight-users mailing list
>>>>Insight-users at itk.org
>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>
>>>>
>> 
>> 
>> = = = = = = = = = = = = = = = = = = = =
>> 			
>> 
>>         致
>> 礼!
>>  
>> 				 
>>         庄吓海(Xiahai Zhuang)
>>         arhye at 163.com
>>           2005-08-26
>> 
>> 
>> 
>> 
>> 
>> 

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        庄吓海(Xiahai Zhuang)
        arhye at 163.com
          2005-08-29






More information about the Insight-users mailing list