Hey there! Sorry you are having problems. I'll do my best to help you out.
For starters, how do I remove the console window?
I tried using the linker flag SUBSYSTEM:WINDOWS, but now my program crashes on exit with the error
core.exception.InvalidMemoryOperationError
Do you get the same errors when you
don't use SUBSYSTEM:WINDOWS? And do you know if there is any specific object that is causing the error? Also, if you are using SUBSYSTEM:WINDOWS, how do you know you are getting the memory issue? When I hide the console and I get this kind of error it usually just crashes for me.
It seems that this is related to the "Destroying X" messages that were written on the console when there was a console. Since now there is no console, it is an error to print. :/
Those messages are just going to cerr, so that shouldn't effect the program in this way.
Furthermore, the code to print those messages are after a "debug" condition, so I tried building my program using "releaseMode" as a building option in my dub package but it didn't have any effect. It only had effect on the code that was after a debug condition in my program, does that mean I have to somehow build the DSFML wrapper in release mode?
What do you mean by "It only had effect on the code that was after a debug condition in my program"? Can you elaborate a little on that?
If you use DUB, then you shouldn't need to build the wrapper. DUB handles all that for you. All my tests deal with the source code directly so I haven't tested with DUB in quite a while. Perhaps I should add that to my set of tests. That's said, if you build in release, you shouldn't be seeing them at all. Not sure what's going on there.
Besides that I'm worried that those "Destroying X" messages only ever appeared when my program exited. I heard D is garbage collected, but should I be destroying anything manually in DSFML? How? If not why stuff is only ever destroyed when the program exits?
That is normal for small programs. It is just cleaning up the used objects at exit. You'll only see the destroying messages during run time if you have actual garbage that needs to be collected. You
can destroy stuff manually if you like, but it isn't necessary in most cases. If you want to, just call destroy on an object.
Source code of my worries: https://github.com/Jebbs/DSFML/wiki/Building-Your-First-DSFML-Program%28DUB%29
Are you absolutely sure that you are using that code and you haven't modified it in any way?
Some other info would be much appreciated too.
1. What OS are you compiling on?
2. Are you compiling in 32 or 64 bits?
3. Where did you get the shared libraries you are using?
We will get this figure out!