I'm trying to use a open source library from a Windows application, and the only pre-built version I can find comes as a file called "lib.dll.a"
What format is this, and can I convert it to a normal dll file?
I'm trying to use a open source library from a Windows application, and the only pre-built version I can find comes as a file called "lib.dll.a"
What format is this, and can I convert it to a normal dll file?
Naming the output file libjvm.dll.a
will allow gcc
to recognize it as a
library named jvm
. The .dll.a
suffix indicates (by convention) that it is
an import library, rather than a static library (which would simply be named
libjvm.a
, again by convention).
ar
. file
returns COFF object file
for the .o
s inside. –
Haberdasher Linux / MacOS / Linuxen have .a for static libraries and .so for dynamic libraries.
Windows has .lib for static libraries and (import) .lib + (matching) .dll for dynamic libraries. The import.lib statically links the hooks needed to talk to the .dll library loaded later.
To help avoid the confusion with this, the Msys / MINGW people apparently decided to use .dll.a for the import .lib files. You should be able to rename lib.dll.a to lib-import.lib. You might also be able to just link against them as if they were .lib. The published FFMPEG shared package for Windows (via winget below) includes .a & .dll.a in the lib directory and executables & .dlls in the bin directory. That makes sense because in Windows, .dlls are a type of executable in some ways.
© 2022 - 2024 — McMap. All rights reserved.