Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-11

Static linking to C library on Windows

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

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

Reply by email

Marco van de Voort
to Ryan Joseph

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.

Reply by email