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

Unresolved external linker errors with VS2015

Heimsoth__Brandon
626 Views

I am getting the following Linker error after finally getting things to compile for a project converted from Visual Studio 2005 to Visual Studio 2015 / Intel Parallel Studio XE 2017 (on Windows 10).

libmmt.lib(libm_error.obj) : error LNK2019: unresolved external symbol __snprintf referenced in function _write_message

I've read through similar issues on this forum:

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/637496
https://software.intel.com/en-us/articles/configuring-visual-studio-for-mixed-language-applications

I've tried to verify consistency between my Fortran and C/C++ projects.  All my C/C++ projects have "Runtime Library" set to "Multi-threaded Debug".  All of my Fortran projects have "Runtime Library" set to "Debug Multithreaded".  In the other posts, how did everyone know that the users had mixed static and dynamic libraries?  I have yet to investigate external libraries referenced.

I've also added the IFORT_COMPILER17 paths to include/library directory lists.

Does anyone have any other ideas?

 

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
626 Views

In the Linker > General property page, set Show Progress to “Show all progress messages”. The build log will then show every library searched and which symbols were found in each one. This can help you identify mixtures of static and DLL libraries. Libmmt.lib is a static library, and if the project is linking to DLLs that may not work.

Did you recompile all the sources? Easiest thing may be to delete the whole Debug or Release folder and rebuild the project.

0 Kudos
mecej4
Honored Contributor III
626 Views

Try the two suggestions at https://stackoverflow.com/questions/32418766/c-unresolved-external-symbol-sprintf-and-sscanf-in-visual-studio-2015 .

0 Kudos
Reply