How to build gnu `libiconv` on & for windows?

后端 未结 4 2296
南笙
南笙 2020-12-16 21:06

I want to build a static library (*.LIB file) GNU libiconv on windows to be used with other libraries in Visual C++. Other libraries I\'m using are built with \"MultiThreade

4条回答
  •  旧巷少年郎
    2020-12-16 21:22

    A little addition to your answer. I had the same issue and found that the MinGW + MSYS solution was perfect.

    Though, I needed to go a little further and generate also the .lib file in order to be able to link with the resulting dll.

    This is what I found:

    • generate a .def file from the dll with dumpbin (a Visual Studio tool).

    • generate the .lib file from the .def with the lib program (Visual Studio tool too)

    This allows you to specify some link flags if appropriate. Everything detailed here (I'm not the author of this method): http://wiki.videolan.org/GenerateLibFromDll

    I also realized that this lib/dll couple can be linked with both MD and MDd libraries.

    Hope that can help people that find this post, like it helped me.

    -David

提交回复
热议问题