Linker can't resolve any references

Kai Ruottu kai.ruottu@wippies.com
Wed Jun 23 12:35:00 GMT 2010


23.6.2010 10:51, Kai Ruottu kirjoitti:

>>> Bob Cowdery<bob@bobcowdery.plus.com> 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 would check the instructions for creating DLLs...

Ok, the basic idea used to be that when linking the DLL also it's
equivalent "import library", 'libmydll.a' for the 'libmydll.dll'
would be created. Whether the '-shared' does this automatically is
unclear. For instance at :

http://sig9.com/node/35

there is the phase "3" :

# Creating the dll

gcc -shared -o message.dll dll.o -Wl,--out-implib,libmessage.a

for creating the import library at the same time with the DLL
itself.

When linking executables which will use the DLL, the import lib
will be used, NOT the DLL itself!





More information about the Gcc-help mailing list