Watch me beat a dead horse. Super simple program...

ryuukk_ ryuukk.dev at gmail.com
Wed Mar 22 19:40:27 UTC 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.dll

Most likely a dependency that is missing?

Can you zip your folder and upload it somewhere so i could try 
help you debug this issue?


More information about the Digitalmars-d-learn mailing list