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

Link error in a C++ project that links to Fortran library

andrew_terekhov
Beginner
295 Views
I have a C++ program that links to a static Fortran library. I use VC 7.1 for C++ and IVF for Fortran projects. I get a link error LNK2019: unresolved external symbol _SUBLOAD@4 referenced in function _DASUBLOAD. It happens if the SUBLOAD Fortran subroutine has a parameter of type character array:

subroutine SUBLOAD(facilityIDs)
character facilityIDs(30)
end subroutine

If I change the parameter type to something else I don't get the link error. I created the simplest test case to demonstrate the problem and attached the sources and project files.
0 Kudos
0 Replies
Reply