DLL dependencies with Mingw on Windows

I am working on a program that uses autotools for its build system and compiles fine on linux. To build for Windows, I am trying to get a mingw cross-compiler working for windows. Now that I am compiling on linux and moving on to windows, of course, I am missing some DLL, which by default is not installed on windows. This results in no dll errors. I cannot statically link my program due to limitations in the LGPL.

So my question is what is the correct way to cross-compile in this situation? I feel like I need to wrap exe in an installer that automatically resolves and installs dll dependencies for windows, but I could not find anything explaining how to do this. I mainly think of yum / apt-get for windows. How to manage dll dependencies on windows? I am a guy from Linux, not a guy from a window, so please carry me.

+4
source share
1 answer

Probably the easiest way would be if you could transfer your development to a Windows machine. But unfortunately, you can install Windows-Mingw on your Linux machine using Wine. (IIRC winetricks has even a purpose for this) This way you get a โ€œfeelโ€ for problems in windows. An alternative could be Windows in a virtual machine, but Wine should be fine for the development environment.

I also highly recommend installing Microsoft Visual C ++. Express versions will work fine. There are a number of tools that come with MSVC ++ that can make your life a lot easier, for example, checking dll dependencies, etc. An additional excellent source of information is the Sysinternals from Mark Russinovich and him.

-2
source

Source: https://habr.com/ru/post/1383764/


All Articles