I have an app that I’m compiling for both Mac and Windows. On the windows compile, I’ve learnt that I need to include a series of dll files in order for the .exe file to run. I include these in the /bin folder by simply copying them across.
For what seems like the majority of windows users, this works fine - the .exe file runs no problem. But, with one or two users, they get a persistent message reading *‘The code execution could not proceed because ***.dll was not found. Reinstalling the program may fix this problem’
Does anyone know why this is happening and how we might fix it?
Installing c++ redistributable
If you are compiling with MSYS2, you may try
That will copy the needed mingw32 dlls into your bin folder.
Hi there, thanks for the responses
I’m compiling in VS 2017, and copying the required dll files across into the bin folder manually. It is the same dll files that are being named in the error message: fmodex64, fmodexL64, FreeImage, and libiconv.dll (the last one is the one that is called in the current message, but in the past others have been too).
We’ve tried installing c++ redistributable but it didn’t fix the issue.
It depends whether you’re building your OF app in Visual Studio or QtCreator/MSYS2…
Compiled Visual Studio project supposedly depends on vc++ redistributable.
I personally find Mingw32 more versatile and open alternative (without need to install vc++ redist and it was here since the first OF releases on Code::Blocks), but I’m afraid the only solution is to manually copy all the DLLs that it actually requires…
Tried to compile it with
make copy_dlls as suggested by @oxillo, and it didn’t work somehow… Got no dlls copied to the folder with the executable. But once you copy all the dlls it asks for, it should stop asking for more stuff and run it properly. (Not sure if having Msys2 installed in the system makes a difference or not though…)
There is a bug in OF0.10.1 where it tries to get debug version of the generated executable.
You may rename your app from myApp.exe to myApp_debug.exe, run ‘make copy_dlls’ and rename back to myApp.exe.
You may also edit \libs\openFrameworksCompiled\project\msys2\config.msys2.default.mk to have
ifneq ("$(wildcard $(PLATFORM_PROJECT_RELEASE_TARGET))","")
Thanks @oxillo. Just tested and yeah, it worked. I propose your response as a solution.
Sorry but I don’t see how the above three replies answer my original query. They seem like a tangental issue, i.e how to auto copy the .dll files
- I am compiling on visual studio, not mysys2
- I already have all the dll files required to run the exe copied to the bin file I am sharing with others
- I know the compile works because it works on most other windows machines
- On some machines I get a '.dll was not found’ message on attempting to run the exe file
What would cause the above, and how do I fix it?
Have you tried installing vc++ redistributables AND having all the dlls in the folder with the .exe?
The following .dlls automatically copy into the bin folder:
The libiconv.dll does not copy automatically and I have to find and copy it in manually.
Mostly the compiled exe works fine, but on some machines the .dll not found message appears on attempting to run.
Might this be a PC security software clash? Some protection system preventing the dlls from being found/run?
I’m at a bit of a loss in terms of finding a fix
Did you fix the problem I have the same or similar problem like yours and I’m searching for the missing DLL files but can’t find it any help if someone fixes the problem and how to do that?
Hmmm well now I just include a lot of DLL files in the zip file with my compiled release. It isn’t perfect but I haven’t had many people unable to get the software working that way