Hi,

On Wed, 29 Dec 2021, Gisle Vanem wrote:

So now, I'm trying to use the above imp-libs in
a MSVC x86 'link.exe' step. The 'hsmodem.exe' program links
fine, but running it fails with missing 'codec2_bits_per_frame'
etc.

I believe this is a known issue with import libraries created by ld. You can work around it by having ld output a def file for the created DLL, and then produce a new import library for it using dlltool. This issue only manifests if linking against two or more import libraries created by ld. While import libraries created by dlltool and ld are pretty much similar, they differ in a minor internal detail.

I have patches for binutils that should fix this, that I've forgotten to upstream - I should get back to that.

In the meantime, when you create your regular import library with an option like -Wl,--out-implib,libfoo.dll.a, add the option -Wl,--output-def,foo.def. After that, run "dlltool -d foo.def -l libfoo.dll.a". This recreates the import library in a form that works better with MS link.exe.

// Martin



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to