How to setup D with SFML? (using bindbc-sfml)
Ki Rill
rill.ki at yahoo.com
Sun Apr 9 09:54:26 UTC 2023
On Saturday, 8 April 2023 at 23:40:32 UTC, Mike Parker wrote:
> On Saturday, 8 April 2023 at 11:31:40 UTC, Ki Rill wrote:
>> How do I set up a D and SFML project using the `bindbc-sfml`
>> package?
>>
>> I tried following the instructions, it builds successfully,
>> but fails to load the SFML library at runtime.
>>
>> In particular, `loadSFML, loadSFMLGraphics, loadSFMLXXX`
>> fails. Here is
>> [link](https://github.com/rillki/d-sfml-project-template) to
>> the repo. I plan to create another how-to video, but I cannot
>> find what's causing it to fail.
>>
>> Do you have any ideas?
>
> Not without error messages. The first thing you should do is
> use the error API in bindbc.loader to print them out. That
> should tell you what the problem is.
I forgot about that). Here are the errors that occur on Windows:
```
csfml-system.dll, The specified module could not be found.
csfml-audio.dll, The specified module could not be found.
csfml-audio-2.dll, The specified module could not be found.
csfml-audio-2.0.dll, The specified module could not be found.
```
Why can't it find these libraries? I tell where to look for them:
```D
version(Windows) {
import bindbc.loader;
setCustomLoaderSearchPath("libs"); // tried using absolute
path as well
}
```
That is strange...
More information about the Digitalmars-d-learn
mailing list