Re: Linker can't resolve any references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



23.6.2010 10:18, Bob Cowdery kirjoitti:

Ian Lance Taylor wrote:
Bob Cowdery<bob@xxxxxxxxxxxxxxxxxxx>  writes:

This is such a basic problem I must be doing something daft. I have a
set of static libraries which I am linking into a dll. None of the
external references seem to be getting resolved. This is on Win7 and I
have MinGW and msys installed using the msys make.

The GNU linker used on MinGW is a Unix linker, and as such the order
of the -l options is significant and for each -l option it only pulls
in the objects required at that point in the link.  This is different
from how Windows linkers behave.  You most likely need to repeat your
-l options or use the --start-group/--end-group linker options.

Ian

I had read that and I was quite careful to ensure the correct order. I
did a test with just two libraries where the second referenced the first
and as in my follow-up message it didn't pull them in unless I made a
call into each from my main code. It's like the symbol tables are messed
up somehow.

I would check the instructions for creating DLLs... I myself haven't
done that "manually" for years but I remember that being something
weird, not like creating usual Win32 executables. Creating Win32s
executables maybe could be compared to creating DLLs, that was a 2-phase process because of those required "relocations", the functions
needed being relocatable in the address space, not "linear"...


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux