Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.9.1 Error "noLibrary" on Windows when loading DLL #11

Open
nunocp opened this issue Oct 18, 2021 · 1 comment
Open

v0.9.1 Error "noLibrary" on Windows when loading DLL #11

nunocp opened this issue Oct 18, 2021 · 1 comment

Comments

@nunocp
Copy link

nunocp commented Oct 18, 2021

Hi, great work you have here!
I tried to load the dll, both named as "libraylib.dll" (mingw version, as supplied by raylib's repo) and "raylib.dll" (as defined in your code, using just loadRaylib()). Tried 64bit and 32bit also, .dll in the same folder of the .exe binary. but sadly no success... It keeps returning "noLibrary".

I took a look on this package's code and compared it to bindbc-sdl (which is working fine on Windows) to see if I'd spot some error, but I'm new to Dlang and spotted none.

Am I missing something? Is there some other configuration or maybe some arg/flag to pass to the compiler?

@o3o
Copy link
Owner

o3o commented Oct 20, 2021

Hi,
I'm not used to working on Win, I don't know if I can help you..so loadRaylib try to load the dll raylib.dll:

RaylibSupport loadRaylib() {
   version (Windows) {
      const(char)[][1] libNames = ["raylib.dll"];

the win search order is described here

The standard DLL search order used by the system depends on whether safe DLL search mode is enabled or disabled. Safe DLL search mode places the user's current directory later in the search order.
...
If SafeDllSearchMode is enabled, the search order is as follows:

  1. The directory from which the application load

...try to set SafeDllSearchMode...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants