I appreciate all the help people have given me previously. So I've made everything super simple. The dub.sdl file consists of four lines:

name "00_03_freeimage_debug"
dependency "bindbc-glfw" version="~>1.0.0"
dependency "bindbc-freeimage" version="~>1.0.2"
versions "FI_318"


The app.d use exists() functions to prove the existence of both .dll files before their load_xxx functions.

import std.stdio;
import std.file; // exists
import bindbc.freeimage;
import bindbc.loader;
import bindbc.glfw;

void main()
{
    if (exists("FreeImage.dll"))
        writeln("the file FreeImage.dll DOES exist");
    else
        writeln("the file FreeImage.dll NOT FOUND");
        
    FISupport ret = loadFreeImage(`FreeImage.dll`);
    writeln("ret = ", ret);
        
    ret = loadFreeImage();
    writeln("ret = ", ret);
        
    if (exists("glfw3.dll"))
        writeln("the file glfw3.dll DOES exist");
    else
        writeln("the file glfw3.dll NOT FOUND");

    GLFWSupport retGLFW = loadGLFW("glfw3.dll");
    writeln("retGLFW = ", retGLFW);

    retGLFW = loadGLFW();
    writeln("retGLFW = ", retGLFW);   
}

The Output shows:

the file FreeImage.dll DOES exist
ret = noLibrary
ret = noLibrary
the file glfw3.dll DOES exist
retGLFW = glfw30
retGLFW = glfw30

So my app.d thinks that FreeImage.dll is present. But loadloadFreeImage fails.

My dub command uses the --arch=x86_64 so I know app.d is a 64 bit app. And I've checked the FreeImage.dll and downloaded it countless times making extra sure that it is the 64 bit Freeimage library and not the 32 bits. I'm getting the FreeImage.dll from SourceForge if that is relevant.

My windows 10 machine shows FreeImage.dll to be the following:

07/31/2018  01:23 PM         6,942,208 FreeImage.dll
03/06/2023  04:25 PM           216,576 glfw3.dll


I'm stuck. Not sure how to make any headway.




  • My tiny program ... WhatMeWorry via Digitalmars-d-learn

Reply via email to