How can I get mingw to emit .lib instead of .a static libraries on windows? #11380
Unanswered
ThatNerdUKnow
asked this question in
Q&A
Replies: 1 comment 6 replies
-
This is documented as the Note that the filename suffix has nothing to do with the ABI you're building for and the tooling doesn't care. Windows doesn't have significant filename extensions and you have to name the exact file you're linking to anyway. It's an acceptable filename to use even when building MSVC-style libraries. Note also that you can mix GNU and MSVC libraries, you just have to use the ucrt for mingw (this should be the default these days). Many people do so, @nirbheek for example can attest to this for gstreamer. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all, I am trying to build this library that only seems to build on the mingw toolchain, and by default the build is generating .a static libraries when I need it to generate .lib static libraries. It's my understanding that you can't really mix libraries distributed in msvc style libraries
.lib, .dll
and mingw style libraries.a, .so
.Here's what my native file looks like
Would the archiver be the way I get one type of library to generate vs the other?
This is coming from an issue i'm having compiling a rust library that links to two c libraries. One library is distributed using .lib and .dll libraries while the other isn't distributed anywhere and I have to build it from source, hence why I'm trying to get them to play nice together.
When I use the mingw toolchain in rust, I can't link to ffmpeg, while if I use the gcc toolchain I'm able to link to ffmpeg, but can't link to this library I'm building from source cause I'm mixing and matching compilers?
Beta Was this translation helpful? Give feedback.
All reactions