Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Link errors with VS 2010 platform toolset

Mark_Jablin
Beginner
447 Views

I'm using Intel® Parallel Studio XE 2015 Update 4 Composer Edition in Visual Studio 2015.  Due to some project constraints, I need to link to a c++ library built using the 2010 platform toolset to be compatible with some older code.  Then I try to link to the library in question, I get link errors similar to this:

error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)

If I build the C++ library using the 2015 platform toolset, everything links and runs fine.  Is my edition of the Fortran compiler compatible with the 2010 toolset?  If so, how can I make them get along?

Thanks in advance.

0 Kudos
2 Replies
Mark_Jablin
Beginner
447 Views

I think I solved my problem.  I went to Tools->Options->Intel Compilers and Tools and found these settings:

Capture.JPG

I changed the "Libraries" and "Default Options" items to point at the VS 2010 directories instead of the defaults. 

If there is a better or more elegant way to do this, please let me know.

0 Kudos
Steven_L_Intel1
Employee
447 Views

This is really a C++ issue. C++, unlike Fortran, is sensitive to the VS version used and tends to require that the compiler version match the libraries version. The solution you found seems reasonable to me.

0 Kudos
Reply