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

Linker Error while using ICC

rayvjon
Beginner
464 Views
Hi,
I've been trying to use ICC to compile our product in the past few days, with little success.
Compilation phase ends without any error, but then I receive the following errors during the linking stage.
Compiling (and linking) using MS compiler works perfectly, on both VS 2005 and 2008.
Would appreciate any insight as to how to solve this problem.
Thanks,
Jonathan
--------------------------------------------
1>Linking... (Intel C++ Environment)
1>xilink: executing 'link'
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.3
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.4
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.5
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnHBExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.6
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnHBExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.7
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnHBExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.8
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnIdleExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.14
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnIdleExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.15
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnIdleExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.16
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnTOExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.8
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnTOExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.9
1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnTOExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.10
1>Release\\satellite_application_2G.exe : fatal error LNK1120: 12 unresolved externals
1>Linking... (Intel C++ Environment)1>xilink: executing 'link'1>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.31>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.41>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.51>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnHBExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.61>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnHBExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.71>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnHBExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.81>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnIdleExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.141>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnIdleExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.151>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnIdleExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.161>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnTOExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.81>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnTOExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.91>ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?tconnTOExpired@DataConnection@RVProtocol@@IAEXI_K@Z.0.101>Release\\satellite_application_2G.exe : fatal error LNK1120: 12 unresolved externals
0 Kudos
6 Replies
TimP
Honored Contributor III
464 Views
I guess you're referring to the Intel C++ for Windows (ICL) with ipo enabled. In case you missed it, it's not possible to use either the ICL ipo option nor the CL /GL option when making a build which combines objects from both compilers. If you are intending to perform such a mixed build, you must set /GL- and also avoid invoking /Qipo (which would happen indirectly with options such as /fast).
0 Kudos
JenniferJ
Moderator
464 Views

Which version of the icl are you using?
The latest production release is: w_cproc_p_11.1.065

If you're using anything earlier, please try the latest. If still link error, please let us know.

Thanks,
Jennifer

0 Kudos
rayvjon
Beginner
464 Views
I'm using the latest (11.1.065) version.
I've managed compiling and linking the application with IPO disabled. However, I do not understand why Interprocess Optimization shouldn't work - I'm using ICL on all of the solution's projects, so there shouldn't be any 'hybrid' code between the ICL and the regular MS CL.
Jon
0 Kudos
JenniferJ
Moderator
464 Views

when ipo is used the .obj contains an intermediate info that are not real .obj data. so link.exe from MSVC does not understand it.
but as long as you're building the program within MSVC, or using "xilink" to link, the program should link ok.

So there is a bug in the icl compiler.

Let's concentrate on the 1st error msg: "ipo_29285obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.3".

the symbol: ?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z
is: public: void __thiscall RVProtocol::RTO::updateRTT(class EngineInfrastruct::TimeVal const &,bool)

so can you build only the .cpp containing above class implementation with /Qipo and others with no /Qipo? see if you still get the error.

Thanks,
Jennifer

0 Kudos
rayvjon
Beginner
464 Views
OK:
RTO.cpp is part of the rayv_protocol project, while the TimeVal object is part of the rvinfrastruct project.
I've turned interprocedural Optimization off on both projects, and then turned on /Qipo only on RTO.cpp.
Still getting the following Errors:
2>ipo_31205obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.3
2>ipo_31205obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.4
2>ipo_31205obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.5
2>ipo_31205obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.32>ipo_31205obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.42>ipo_31205obj3.obj : error LNK2001: unresolved external symbol unwind.?updateRTT@RTO@RVProtocol@@QAEXABVTimeVal@EngineInfrastruct@@_N@Z.0.5
------------------------------------
Using /Qip on both projects instead of /Qipo works. Any suggestions?
Jon
0 Kudos
JenniferJ
Moderator
464 Views
Thanks for trying out!

It means there is a bug in the compiler when compiling RTO.cpp with /Qipo.

is it possible for you to send the RTO.i file (see how to create here)?
You may want to use "Private response" when upload.

Jennifer
0 Kudos
Reply