cancel
Showing results for 
Search instead for 
Did you mean: 

linker error itk_main.obj in visual studio 2015

Experimenter
Experimenter

Hi I am newbie to Teamcenter and IDK , getting this error while creating a itk project in vc++ in visual studio 2015 but in vs 2012 it is working fine

 

 

 

Please help me with this

 

Hi I am newbie to Teamcenter and IDK , getting this error while creating a itk project in vc++ in visual studio 2015 but in vs 2012 it is working fine

 

 

 

Please help me with this

 

 Severity Code Description Project File Line Suppression State
Warning LNK4098 defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library ITKFirst C:\Users\***************\documents\visual studio 2015\Projects\TC\ITK\ITKFirst\ITKFirst\LINK 1
Error LNK2019 unresolved external symbol __imp___iob_func referenced in function __catch$main$0 ITKFirst C:\Users\***************\documents\visual studio 2015\Projects\TC\ITK\ITKFirst\ITKFirst\itk_main.obj 1
Error LNK2019 unresolved external symbol __imp_fprintf referenced in function __catch$main$0 ITKFirst C:\Users\***************\documents\visual studio 2015\Projects\TC\ITK\ITKFirst\ITKFirst\itk_main.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPEBDH@Z) referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::_System_error_category::message(int)const " (?message@_System_error_category@std@@UEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z) ITKFirst C:\Users\***************\documents\visual studio 2015\Projects\TC\ITK\ITKFirst\ITKFirst\itk_main.obj 1
Error LNK2019 unresolved external symbol _XcptFilter referenced in function "int __cdecl ERRORXX_filter_exception(int,struct _EXCEPTION_POINTERS *)" (?ERRORXX_filter_exception@@YAHHPEAU_EXCEPTION_POINTERS@@@Z) ITKFirst C:\Users\***************\documents\visual studio 2015\Projects\TC\ITK\ITKFirst\ITKFirst\itk_main.obj 1
Error LNK1120 4 unresolved externals ITKFirst C:\Users\***************\documents\visual studio 2015\Projects\TC\ITK\ITKFirst\x64\Debug\ITKFirst.exe 1

 

1 REPLY

Re: linker error itk_main.obj in visual studio 2015

Genius
Genius

Show your example code.

 

This error probably mean that you use classic main() function but have  itk_main.obj in <inputs> field in your project settings or check subsystem field in project settings (need to be <Console>)

 

If you use ITK_user_main() then you need itk_main.obj in project settings -> Linker->inputs

 

If you use classic main() as entry point then itk_main.obj not needed.Also ITK_init_from_cpp() call needed in main()