Static linking to C library on Windows

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

Static linking to C library on Windows

Free Pascal - General mailing list
Moving on to Windows now and more basic problems. I've built from Python sources again but I'm not sure about static libraries on Windows. There is a .dll which is a dynamic library and .lib which I assume is the static library. Again I link using:

{$linklib python37.lib}

But I get: "Error: Invalid DLL XXX/python37.lib, Dos header invalid".

I see the compiler found the library but I may not have made the library correctly. How can I know if this .lib is what I think it is?

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Static linking to C library on Windows

Marco van de Voort-2

Op 2019-11-27 om 21:38 schreef Ryan Joseph via fpc-pascal:
> Moving on to Windows now and more basic problems. I've built from Python sources again but I'm not sure about static libraries on Windows. There is a .dll which is a dynamic library and .lib which I assume is the static library. Again I link using:

More likely the .lib is just an import lib for the dll.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal