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

Issue linking when building with VS2015 Update 1 and Intel Compiler 2016.1.146

Enda_D_
Beginner
548 Views

hi,

I am trying to build a pre-existing VS2015 (Version: (00322-80000-00000-AA353)

solution using the Intel Parallel Studio 2016 Compiler inside the VS environment.

Using VS2015,I get the following errors on link:

libirc.lib(irc_msg_support.obj) : error LNK2001: unresolved external symbol _printf
libirc.lib(irc_msg_support.obj) : error LNK2001: unresolved external symbol _sprintf
libirc.lib(irc_msg_support.obj) : error LNK2001: unresolved external symbol _vsprintf
GH.lib(DynamicNode.obj) : error LNK2001: unresolved external symbol ___intel_sse2_strlen
GH.lib(wordinfo.obj) : error LNK2001: unresolved external symbol ___intel_sse2_strlen

....

( multiple ___intel_sse2_strlen related errors)

 

So I assume I am missing some extra step in the VS linker options to accomodate the Intel Compiler,

but I can't see what that is.

All help appreciated.

Regards,

ED

0 Kudos
3 Replies
Feilong_H_Intel
Employee
548 Views

Hi Ed,

Were you getting those errors with Microsoft compiler or with Intel compiler?  It seems that the linker didn't pick up Intel libraries that define those symbols/functions.  If parts of your projects, e.g. dynamic libraries required by your main project, are built with Intel compiler, it's better to build main project with Intel compiler too.  Otherwise, you will have to specify required Intel libraries in linker options.  If I remember correctly,  ___intel_sse2_strlen is defined in Intel's libirc.lib.

Thanks

0 Kudos
Enda_D_
Beginner
548 Views

hi Feilong,

Thanks very much for the quick response.

The entire solution has is being compiled with the Intel Compiler.

I think the fact libirc.lib cannot resolve the _printf, _sprintf,  _vsprintf 

symbols is the nub of the __intel_sse2_strlen problems but I cannot see the root cause of the

assorted printf symbols not being resolved.

Regards,

ED

 

0 Kudos
Melanie_B_Intel
Employee
548 Views

The undefined printf symbols may be originating in your program (your program may contain declarations like this: "extern int printf ...")

Microsoft has rewritten the c runtime, and "extern print" no longer exists. #include <stdio.h> everywhere you need to call printf.

You can use the system tool dumpbin to find which object module has the undefined reference.

BTW vs2015 is currently at update 1, there is no update 3.

0 Kudos
Reply