From: Paul O. <pa...@gm...> - 2013-02-22 07:24:00
|
I am working on Win32 a project that is a mix of C++, C and Fortran. The C and C++ is compiled using Visual C++ 2008 and the Fortran is compiled with an ancient version of Absoft Fortran (version 4.5). The project's DLLs and executable are linked using the Visual Studio 2008 linker. I am looking into the feasibility of replacing the Absoft Fortran compiler with gfortran. I installed MinGW in the default location using mingw-get-inst-20120426.exe and getting the latest repository catalogues (I reinstalled 21 FEB 2013 to make sure I was up to date.) Using gendef and the Visual Studio lib tool I created an interface library for libgfortran-3.dll. I started with one of my utility DLLs and successfully compiled all the Fortran using gfortran but at link time I am getting two unresolved external references: sdely.obj : error LNK2019: unresolved external symbol _lroundf referenced in function _sdely sfmove.obj : error LNK2019: unresolved external symbol ___chkstk_ms referenced in function _sfmove sdely () calls the Fortran intrinsic procedure NINT (). I understand that calls to such rounding functions resolve to gcc library functions, but _lroundf doesn't seem to be exported from any of the MinGW DLLs. I also searched the MinGW provided DLLs and objects and could not find ___chkstk_ms either. Can I link gfortran objects into a Visual C++ linked DLL? What do I need to do to resolve these references? Thanks, Paul |