digitalmars.D.learn - Watch me beat a dead horse. Super simple program...
- WhatMeWorry (51/51) Mar 22 2023 Ok, I've gotten rid of dub and dub packages code. Just
- ryuukk_ (4/55) Mar 22 2023 Most likely a dependency that is missing?
- Richard (Rikki) Andrew Cattermole (6/6) Mar 22 2023 I finally went ahead and looked at the dependencies of FreeImage3180.
- WhatMeWorry (7/14) Mar 22 2023 Yes! Thank you very much. Downloaded the 2015 Microsoft Visual
- Richard (Rikki) Andrew Cattermole (6/12) Mar 22 2023 That would be the most likely solution to be do-able. But this really
Ok, I've gotten rid of dub and dub packages code. Just LoadLibraryA. All eight dlls work except for FreeImage.dll. I've compiled with dmd and -m64 option and freshly download a x64 FreeImage. Any Window users out there that use LoadLibraryA or FreeImage.dll? ``` import std.stdio: writeln; import std.string: toStringz; import core.sys.windows.windows: LoadLibraryA; void main() { string[] DLLs = [ "assimp.dll", "fmod.dll", "freetype.dll", "glfw3.dll", "OpenAL32.dll", "SDL2.dll", "SDL2_mixer.dll", "FreeImage.dll" ]; foreach(dll; DLLs) { void *ptr = LoadLibraryA(toStringz(dll)); if (ptr) writeln("calling LoadLibraryA with ", dll, " ptr is set"); else writeln("calling LoadLibraryA with ", dll, " ptr is NULL"); } } ``` C:\Users\Admin\Documents\GitHub\Delivery\apps\00_03_freeimage_debug>app.exe calling LoadLibraryA with assimp.dll ptr is set calling LoadLibraryA with fmod.dll ptr is set calling LoadLibraryA with freetype.dll ptr is set calling LoadLibraryA with glfw3.dll ptr is set calling LoadLibraryA with OpenAL32.dll ptr is set calling LoadLibraryA with SDL2.dll ptr is set calling LoadLibraryA with SDL2_mixer.dll ptr is set calling LoadLibraryA with FreeImage.dll ptr is NULL C:\Users\Admin\Documents\GitHub\Delivery\apps\00_03_freeimage_debug>dir 03/22/2023 01:45 PM 3,116 app.d 03/22/2023 01:46 PM 681,984 app.exe 03/06/2023 04:25 PM 3,805,184 assimp.dll 03/06/2023 04:25 PM 1,721,344 fmod.dll 03/06/2023 04:25 PM 6,942,208 FreeImage.dll 03/06/2023 04:25 PM 832,512 freetype.dll 03/06/2023 04:25 PM 216,576 glfw3.dll 03/06/2023 04:25 PM 122,904 OpenAL32.dll 03/06/2023 04:25 PM 1,220,096 SDL2.dll 03/06/2023 04:25 PM 143,872 SDL2_mixer.dll
Mar 22 2023
On Wednesday, 22 March 2023 at 19:33:45 UTC, WhatMeWorry wrote:Ok, I've gotten rid of dub and dub packages code. Just LoadLibraryA. All eight dlls work except for FreeImage.dll. I've compiled with dmd and -m64 option and freshly download a x64 FreeImage. Any Window users out there that use LoadLibraryA or FreeImage.dll? ``` import std.stdio: writeln; import std.string: toStringz; import core.sys.windows.windows: LoadLibraryA; void main() { string[] DLLs = [ "assimp.dll", "fmod.dll", "freetype.dll", "glfw3.dll", "OpenAL32.dll", "SDL2.dll", "SDL2_mixer.dll", "FreeImage.dll" ]; foreach(dll; DLLs) { void *ptr = LoadLibraryA(toStringz(dll)); if (ptr) writeln("calling LoadLibraryA with ", dll, " ptr is set"); else writeln("calling LoadLibraryA with ", dll, " ptr is NULL"); } } ``` C:\Users\Admin\Documents\GitHub\Delivery\apps\00_03_freeimage_debug>app.exe calling LoadLibraryA with assimp.dll ptr is set calling LoadLibraryA with fmod.dll ptr is set calling LoadLibraryA with freetype.dll ptr is set calling LoadLibraryA with glfw3.dll ptr is set calling LoadLibraryA with OpenAL32.dll ptr is set calling LoadLibraryA with SDL2.dll ptr is set calling LoadLibraryA with SDL2_mixer.dll ptr is set calling LoadLibraryA with FreeImage.dll ptr is NULL C:\Users\Admin\Documents\GitHub\Delivery\apps\00_03_freeimage_debug>dir 03/22/2023 01:45 PM 3,116 app.d 03/22/2023 01:46 PM 681,984 app.exe 03/06/2023 04:25 PM 3,805,184 assimp.dll 03/06/2023 04:25 PM 1,721,344 fmod.dll 03/06/2023 04:25 PM 6,942,208 FreeImage.dll 03/06/2023 04:25 PM 832,512 freetype.dll 03/06/2023 04:25 PM 216,576 glfw3.dll 03/06/2023 04:25 PM 122,904 OpenAL32.dll 03/06/2023 04:25 PM 1,220,096 SDL2.dll 03/06/2023 04:25 PM 143,872 SDL2_mixer.dllMost likely a dependency that is missing? Can you zip your folder and upload it somewhere so i could try help you debug this issue?
Mar 22 2023
I finally went ahead and looked at the dependencies of FreeImage3180. Try installing: https://www.microsoft.com/en-ca/download/details.aspx?id=48145 It requires VCOMP140.dll which comes with the 2015 VC redistribution package. Found via: https://github.com/lucasg/Dependencies
Mar 22 2023
On Wednesday, 22 March 2023 at 21:08:23 UTC, Richard (Rikki) Andrew Cattermole wrote:I finally went ahead and looked at the dependencies of FreeImage3180. Try installing: https://www.microsoft.com/en-ca/download/details.aspx?id=48145 It requires VCOMP140.dll which comes with the 2015 VC redistribution package. Found via: https://github.com/lucasg/DependenciesYes! Thank you very much. Downloaded the 2015 Microsoft Visual C++ Redistributables and it worked. You mentioning "dependencies" in an earlier post, but didn't know how to proceed. Would it be worth while to update the bindbc-FreeImage documentation or is this common knowledge?
Mar 22 2023
On 23/03/2023 12:28 PM, WhatMeWorry wrote:Yes! Thank you very much. Downloaded the 2015 Microsoft Visual C++ Redistributables and it worked. You mentioning "dependencies" in an earlier post, but didn't know how to proceed. Would it be worth while to update the bindbc-FreeImage documentation or is this common knowledge?That would be the most likely solution to be do-able. But this really needs to be on FreeImage's site. It also appears the README in the distribution is out of date. Since its talking about Mingw for building. But Mingw supports MSVC for building and what version of MSVC installed matters.
Mar 22 2023