Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7954 Discussions

Why is my project still being linked using LINK instead of xilink?

dnesteruk
Beginner
560 Views

I've just converted a project that used the Microsoft compiler to use the Intel one. I'm using Visual Studio 2013 and Intel C++ 15.

Now, looking at compiler output, I see the following:

1>icl: : warning #10210: problem with Microsoft compilation of 'Everything.cpp'
1>Everything.obj : warning LNK4229: invalid directive '/Intel(R) compiler non-linkable IL object file' encountered; ignored
1>LINK : fatal error LNK1561: entry point must be defined
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

So clearly we are still using Visual Studio's linker and this is why the build fails. So, can someone help me figure out how to get the project to use the Intel linker?

Thanks.

0 Kudos
6 Replies
TimP
Honored Contributor III
560 Views

Just in case:

all MSVC compilations need /GL- in order for xilink to work.  ICL objects can have IPO or not.  xilink passes its outputs to Microsoft link, so you can't avoid that, but if you pass IPO objects to MSVC it won't do the right thing either.

Are you certain that your project is set to ICL everywhere, and any necessary rebuilds accomplished?

0 Kudos
dnesteruk
Beginner
560 Views

All I did was choose an existing project and converted it to use the Intel C++ Compiler. That's about it. Here, let me attach the proj file.453537

0 Kudos
dnesteruk
Beginner
560 Views

Incidentally, IPO is turned off. If I turn it on, I get some Boost unresolved externals.

0 Kudos
TimP
Honored Contributor III
560 Views

The message implies that you didn't rebuild everything.obj with icl and /GL was set.

0 Kudos
dnesteruk
Beginner
560 Views

This did not help: I turned off whole program optimization in the property pages, however, I now get a different set of errors:

1>icl: : warning #10210: problem with Microsoft compilation of 'Everything.cpp'
1>  xilink: executing 'link'
1>Everything.obj : error LNK2019: unresolved external symbol "void __cdecl boost::assertion_failed(char const *,char const *,char const *,long)" (?assertion_failed@boost@@YAXPEBD00J@Z) referenced in function "protected: virtual class std::fpos<int> __cdecl boost::io::basic_altstringbuf<char,struct std::char_traits<char>,class std::allocator<char> >::seekpos(class std::fpos<int>,int)" (?seekpos@?$basic_altstringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@io@boost@@MEAA?AV?$fpos@H@std@@V45@H@Z)
1>Everything.obj : error LNK2019: unresolved external symbol "void __cdecl boost::assertion_failed_msg(char const *,char const *,char const *,char const *,long)" (?assertion_failed_msg@boost@@YAXPEBD000J@Z) referenced in function "??$lgamma_imp..0@OU?$policy@U?$promote_float@$0A@@policies@math@boost@@U?$promote_double@$0A@@234@Udefault_policy@234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@@policies@math@boost@@Ulanczos13m53@lanczos@34@@detail@math@boost@@YAOOAEBU?$policy@U?$promote_float@$0A@@policies@math@boost@@U?$promote_double@$0A@@234@Udefault_policy@234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@@policies@12@AEBUlanczos13m53@lanczos@12@PEAH@Z" (??$lgamma_imp..0@OU?$policy@U?$promote_float@$0A@@policies@math@boost@@U?$promote_double@$0A@@234@Udefault_policy@234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@@policies@math@boost@@Ulanczos13m53@lanczos@34@@detail@math@boost@@YAOOAEBU?$policy@U?$promote_float@$0A@@policies@math@boost@@U?$promote_double@$0A@@234@Udefault_policy@234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@U6234@@policies@12@AEBUlanczos13m53@lanczos@12@PEAH@Z)
1>C:\Dropbox\Courses\Hexlet - QF101\projects\cpp\src\..\bin\cgate.exe : fatal error LNK1120: 2 unresolved externals

 

0 Kudos
TimP
Honored Contributor III
560 Views

Apparently you invoke boost library functions but didn't set up that library to link.

0 Kudos
Reply