Step by step tutorials for using bindings in D

eXodiquas exodiquas at gmail.com
Fri Mar 24 23:45:15 UTC 2023


Hello everyone,

once again, I am here for your help. My last questions were 
answered really competently so I try again. :P

So, maybe this is a stupid question, but I have read a lot about 
Bindings to C and C++ libraries for D. For example the Derelict 
project (or now [BindBC](https://github.com/BindBC/bindbc-sfml)) 
is full of them. Now I wanted to use the SMFL2 dynamic bindings.

In my head this works like this:
1. I create a project called sfmltest
2. I have to get the original SFML2 from somewhere
3. I have to place some already compiled SFML2 files somewhere in 
the sfmltest project
4. I have to add the BindBC-SFML dependencies to the sfmltest 
project
5. I have to load the compiled SFML2 files from within my D code
6. I can use the bindings.

But as you see, my idea about the whole workflow is pretty vague.
- What files do I really need from SFML2?
- Where do I have to store the files from SFML2?
- How can I tell the D compiler where to find those SFML2 files?
- Is the overall idea I have about those bindings correct at all?
- How do dynamic bindings and static bindings differ from each 
other?

Is there a good resource to learn about those bindings? I 
currently skim through the books "Web Development in D" and "D 
Cookbook" and there are also mentions of bindings in them, but 
they assume I know what I am doing, what I am not. :D

I hope this question or the array of questions to be real is not 
too stupid.

Thanks in advance and have a nice weekend!

eXodiquas



More information about the Digitalmars-d-learn mailing list