Peter Dons Tychsen donpedro.list@gmail.com writes:
Hej again AJ,
OK. I have made an example that shows the problem here: https://drive.google.com/file/d/1R4iIUkOTEP9dczwpUjqgApHE2W51gLwK/view?usp=s...
https://drive.google.com/file/d/1B-EgplAnMhx_31y5j4Q2Aa6SAx2VW3oe/view?usp=s...
Its a very simple app and lib. Just run "./build.sh" to build both and see the problem.
It includes your suggestion with LoadLibrary(), which seems to make no difference.
The problem in your example that you have two copies of lib.dll.so, one that is imported implicitly and one that is loaded by LoadLibrary, so it gets loaded twice. You have to make sure that the dll loaded by LoadLibrary is exactly the same as the one that was imported at the Unix level.