Web lists-archives.com

Re: [Mingw-users] undefined reference to _imp__*




Are you saying, then, that the DEF file from which the import library is created should provide an alias for each symbol in the DLL?

My present DEF file has entries like these ...

EXPORTS
    symbol1 @1 DATA
    symbol2 @2
    symbol3 @3

Should it have this instead?  ...

EXPORTS
    _imp__ symbol1@16=symbol1 @1 DATA
    _imp__ symbol2@16=symbol2 @2
    _imp__ symbol3@16=symbol3 @3


Thank you for your assistance, Eli.



-----Original Message-----
From: Eli Zaretskii [mailto:eliz@xxxxxxx] 
Sent: Friday, January 13, 2017 2:39 PM
To: MinGW Users List <mingw-users@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Mingw-users] undefined reference to _imp__*

> From: "Cervinka, Mitch" <mitch.cervinka@xxxxxxx>
> Date: Fri, 13 Jan 2017 19:19:29 +0000
> 
> 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__ ?

I think you didn't link against the import library of that DLL.
That's where those _imp__* symbols live.

------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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