I believe the LNK2019 error is related to the 'USE ELEVATION_DATA' portion of this subroutine. USE ELEVATION_DATA, ONLY: M_RD_ELEV_DATA => RD_ELEV_DATA !DEC$ ATTRIBUTES C, REFERENCE, ALIAS:'_RD_ELEV_DATA' :: RD_ELEV_DATA !DEC$ ATTRIBUTES DLLEXPORT :: RD_ELEV_DATA Here's a snippet of one of the subroutines in question: SUBROUTINE RD_ELEV_DATA() The error indicates that the problem lies within the Fortran. LNK2019 unresolved external symbol _imp_ELEVATION_DATA_mp_RD_ELEV_DATA referenced in function _RD_ELEV_DATA After linking I build the C project and get several of the following error: I extracted the Fortran code into its own static library project and successfully built the. However, I've moved to a similar, albeit slightly more complex, C project and have encountered a different error. This resolved the errors I was experiencing for the project I was working on. Thanks for the guidance, the Fortran static library is being properly recognized by the C project.
What is the best approach to verify Visual Studio is configured properly for mixed-language compilation and how to get the C code to recognize the Fortran? f90 file in the same project:īut Visual Studio indicates that the subroutine is not found with the message: "Function definition for 'SETUP' not found"
I've verified that the Intel Compilers are recognized by Visual Studio and followed the steps described here ( ) to configure it for a mixed-language environment but it appears that the Fortran subroutines are not visible to the C code.
There are a couple ways to use Boost with Visual Studio, here are two ways: Property pages and Property sheets. This guide shows how to use Boost library with Visual Studio 2013 or 2015. By Kent, last updated September 30, 2019.
This project contains C code which calls on the subroutines of Fortran code in the same project. How to use C++ Boost library in Visual Studio 2013/2015. I'm working with some legacy code to try and compile it in an updated development environment.