Not so much a FPC question, but more of a generic programming challenge that I'm hoping the experienced folks here can help with.
As some of my other posts show, I have trodden the path recently of calling other libraries, in the form of DLLs which I am commonly compiling from source using MINGW32 or MINGW64.
But, I am struggling with deployment problems. To use one example, I am creating a DLL that works with a commercial tool who have an API. Using that API, and Lazarus, I can create a DLL that works with that program. My DLL, itself, calls other libraries. Notably (in this example) Tesseract, which itself has a dependancy for Leptonica. Those two libraries, themselves, have further dependancies, several of which are part of the MinGW environment. But, simply "shipping" those DLLs with mine doesnt seem to work on a vanilla Windows 10 environment. Sure there are other things needed like installing the C++ Redistributable package etc, but even then, they still wont work. Yet, they work on my development system flawlessly.
So the problem I think is working out how to create\compile a DLL that just has everything else that it needs bui8lt into it? Or, at least, a system that ensures that when you compile a DLL (for example the Tesseract one) that the other DLL that it needs are either built and written to the same location at make time, or is in some other way included.
I'm sure this can be done, but from what I have Googled, it seems rather tricky. What methods are you folks using to get around these headaches? Is there a way to do it that is as straight forward as "get the source code for library A from Github, run configure, run make, and get a DLL that already has in it, or with it, all the other DLLs that it needs"?