Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
6 Views

linking errors when having Intel Parallel Studio XE Composer (2013 and 2017 versions), VisualStudio (2010 and 2015 versions)

Jump to solution

I have a code base(primary C, with some C++) which has recently been ported to Visual Studio 2015. On the same machine(Windows 10 x64) I have installed both Intel Parallel Studio XE Composer 2013 and 2017(installed because of its support for Visual Studio 2015). Under "C:\Program Files (x86)" I have the corresponding installation folders: "Intel"(2013 version) and "IntelSWTools"(2017 version).

After I open my solution with VS2015 and try to compile one of the projects I get this output:

1>------ Build started: Project: tdvdxf, Configuration: Release Win32 ------
1>libifcoremt.lib(for_diags_intel.obj) : error LNK2019: unresolved external symbol _vsprintf referenced in function _for__io_return
1>libirc.lib(irc_msg_support.obj) : error LNK2001: unresolved external symbol _vsprintf
1>libifcoremt.lib(for_diags_intel.obj) : error LNK2019: unresolved external symbol ___iob_func referenced in function _for__io_return
1>libifcoremt.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external symbol ___iob_func
1>libifcoremt.lib(for_aio.obj) : error LNK2019: unresolved external symbol _sscanf_s referenced in function _for_asynchronous
1>libirc.lib(tbk_display.obj) : error LNK2019: unresolved external symbol __snprintf referenced in function _stackwalk_cb
1>D:\bsw_2015\Out\tdvdxf\Release\tdvdxf.exe : fatal error LNK1120: 4 unresolved externals

If rename "C:\Program Files (x86)\Intel" folder to "C:\Program Files (x86)\Intel_" then everything is ok. If I rename it back to "C:\Program Files (x86)\Intel", the problem comes back.It looks like if Intel Parallel Studio XE Composer 2013 is missing, than I can compile in Visual Studio 2015.

At the same time, I need to build the same code base with visual studio 2010 and for this I need Intel Parallel Studio XE Composer 2013 and its folder (C:\Program Files (x86)\Intel)

Any idea on this ?

Thank you!

 

0 Kudos

Accepted Solutions
Highlighted
6 Views

First, you need to make sure

Jump to solution

First, you need to make sure that both your C project and Fortran project have selected the same set of run-time libraries to link against. From the error messages I see that your Fortran project specifies the static libraries, but MSVC defaults to DLL libraries and these must be the same.

In Fortran, it's Libraries > Use Run-Time Library. Multithreaded vs. Multithread DLL, In C, it's under Code Generation. Make these consistent and rebuild.

The next thing is that you have to configure C++ to link to Fortran libraries, and it sounds as if you haven't done this correctly. See https://software.intel.com/en-us/articles/configuring-visual-studio-for-mixed-language-applications

Let us know if this helps

Retired 12/31/2016

View solution in original post

0 Kudos
2 Replies
Highlighted
7 Views

First, you need to make sure

Jump to solution

First, you need to make sure that both your C project and Fortran project have selected the same set of run-time libraries to link against. From the error messages I see that your Fortran project specifies the static libraries, but MSVC defaults to DLL libraries and these must be the same.

In Fortran, it's Libraries > Use Run-Time Library. Multithreaded vs. Multithread DLL, In C, it's under Code Generation. Make these consistent and rebuild.

The next thing is that you have to configure C++ to link to Fortran libraries, and it sounds as if you haven't done this correctly. See https://software.intel.com/en-us/articles/configuring-visual-studio-for-mixed-language-applications

Let us know if this helps

Retired 12/31/2016

View solution in original post

0 Kudos
Highlighted
Beginner
6 Views

Hi Steve,

Jump to solution

Hi Steve,

Thank you for your answer. Indeed to path used for linking Fortran libraries(within the VisualStudio2015 projects) was not configured correctly.

It was: $(IFORT_COMPILER14)compiler\lib\ia32\

I have changed it to: $(IFORT_COMPILER17)compiler\lib\ia32\      and everything builds ok now.

Thank you.

 

0 Kudos