Linker can't resolve any references

Ian Lance Taylor
Wed Jun 23 07:52:00 GMT 2010

Bob Cowdery <> 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. I am using Eclipse
> CDT but get the same result from the command line. Here is the start of
> the build to which I added the -v flag, but it still didn't help me. I
> know this set of libraries builds into a shared library ok because I
> have done so using Python distutils. However, this time its not Python
> at the top end so I can't use that.

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.


More information about the Gcc-help mailing list