What's a ".dll.a" file?
Asked Answered
A

2

35

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?

Arita answered 8/10, 2008 at 23:19 Comment(0)
D
23

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).

Danner answered 14/4, 2012 at 6:43 Comment(3)
Sadly, I'm not using gcc : do you know what format this file is in ? OMF/COFF/something else, and can it be used with toolchains other than gcc?Arita
Seems to be a set of object files archived with ar. file returns COFF object file for the .os inside.Haberdasher
@Arita I have the same issue - have you managed to link with those files? I use Visual Studio and was expecting .dll/.lib files and only have .dll.a/.a files and I'm stuck...Puck
C
-1

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.

https://www.gyan.dev/ffmpeg/builds/

Chastain answered 18/3 at 22:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.