Re: [Mingw-users] undefined reference to _imp__*
- Date: Wed, 18 Jan 2017 20:39:43 +0000
- From: "Cervinka, Mitch" <mitch.cervinka@xxxxxxx>
- Subject: Re: [Mingw-users] undefined reference to _imp__*
I'm fairly sure it's finding the import library. I was seeing different errors earlier when it could not find the library.
I tried adding the -v link switch, as you suggested, but I don't see anything in the output that tells me if it's actually reading the import library.
For what it's worth, I using the Eclipse(Mars version) IDE to build the code using the MinGW Fortran compiler and linker.
From: Eli Zaretskii [mailto:eliz@xxxxxxx]
Sent: Wednesday, January 18, 2017 10:21 AM
To: Cervinka, Mitch <mitch.cervinka@xxxxxxx>
Subject: Re: [Mingw-users] undefined reference to _imp__*
> From: "Cervinka, Mitch" <mitch.cervinka@xxxxxxx>
> CC: "mingw-users@xxxxxxxxxxxxxxxxxxxxx"
> Date: Tue, 17 Jan 2017 22:25:35 +0000
> Okay. Yes, I'm seeing the imp prefixes in the lib file.
> However, the underscores are wrong.
> If I build the import library with DLLTOOL using the --no-leading-underscore option, and then use "nm -A" to examine the file, I see names like ...
> __imp_SYMBOL1 (i.e. 2 underscores before imp and 1 before the name)
> If I build it without that option, the names look like this ...
> __imp__SYMBOL1 (i.e. 2 underscores before imp and 2 before the name)
> However, the linker is looking for names like ...
> _imp__SYMBOL1 (i.e. 1 underscore before imp and two before the name)
No, the linker should look for __imp__SYMBOL1. That's what I see in the MinGW import libraries, which definitely work. Are you sure the linker scans your import library? Adding -v to the link command line should show that.
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
This list observes the Etiquette found at
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: