[Insight-users] still Linking error in examples

庄吓海(Xiahai Zhuang) arhye at 163.com
Thu Aug 25 21:35:36 EDT 2005


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






More information about the Insight-users mailing list