MinGW produces incorrect .dll.a files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MinGW produces incorrect .dll.a files

Jussi Pakkanen
Hi

I filed a bug about incorrect import library generation, but I was
told to ask for help here instead. Details with download links etc
here:

http://sourceforge.net/tracker/index.php?func=detail&aid=2119130&group_id=2435&atid=202435

I build a bunch of DLL files and then link them to a binary.
Everything works great except that in one case MinGW produces an
import library that lacks almost all symbols. Thus linking errors out
with missing symbols.

All the other import libraries work perfectly and they are all created
with identical steps. The only two reasons for this that I could think
of were:

1) somehow the symbols get flagged hidden
2) a bug in MInGW import library generator

I tried to determine if case 1 was true in the way described in the
link above, but it did not work out.

How can I further analyze this error and find out where the true bug is?

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: MinGW produces incorrect .dll.a files

Brian Dessent
Jussi Pakkanen wrote:

> I build a bunch of DLL files and then link them to a binary.
> Everything works great except that in one case MinGW produces an
> import library that lacks almost all symbols. Thus linking errors out
> with missing symbols.

It sounds like you're relying on auto-export, but you also have one or
more stray __declspec(dllexport) declarations.  Remember, the presence
of any one __declspec(dllexport) in any object file disables the
auto-export feature, so if you declare any symbol dllexport you have to
mark them all (or explicily -Wl,--export-all-symbols.)  If this is the
case then the few symbols that are present in the import library should
guide you to where the stray declspecs are, i.e. only those will be
present.

If you can provide a standalone testcase I'm sure you'd get better help.

Brian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users