Web lists-archives.com

[Mingw-users] undefined reference to _imp__*




I am trying to build an old Fortran program with GFortran (ver 5.3.0) on Windows 10 using MinGW.  It links in a DLL and calls various functions in that DLL.  When I build the program, I am seeing numerous errors like "undefined reference to '_imp__*', where * is the actual name of the function.  I have used Dependency Walker to view the names of the entry points in the DLL, and none of them begins with _imp__.  How do I tell the GFortran compiler to not expect the functions to begin with _imp__ ?


Here's a sample of the one of the function definitions in the INTERFACE block ...

         FUNCTION STMVPT (P,T) bind(C, name="STMVPT97")
            use iso_c_binding, only: c_double
!GCC$       attributes stdcall, dllimport     ::  STMVPT
            real    (kind=c_double)           ::  STMVPT
            real    (kind=c_double), value    ::  P
            real    (kind=c_double), value    ::  T
         END FUNCTION STMVPT

When I build my project, I am seeing the following message ...

       :  undefined reference to '_imp__STMVPT97@16'


Dependency Walker shows the following 2 names for this function's entry point ...

       STMVPT97
       _stmvpt97@16

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe