I'm making a single dll which starts off in c++, then calls some subroutines in fortran which in turn call a c++ function and when I link it I get:
sbsday.obj : error LNK2001: unresolved external symbol _addsbsoutputrecord
(and it obviously doesn't link)
sbsday is a fortran subroutine and addSbsOutputRecord is a c++ function which has been defined as:
extern "C" void addsbsoutputrecord(char lulc[], int hru, int gis, int sub, int mgt, int mon, double area, double otherValues[]);
in a c++ header file. It also has the necessary interface defined for it in a fortran mod file.
If I make the project an exe instead of a dll then it links properly and works fine. I have tried defining the c++ function "addSbsOutputRecord" several different ways and in several different files (never at the same time though) and it still doesn't work.
Any help would be greatly appreciated.
fortran/c++ mixed language dll not linking
For more complete information about compiler optimizations, see our Optimization Notice.


