SFML community forums
Bindings - other languages => D => Topic started by: Core Xii on May 25, 2009, 05:29:57 pm
-
import\dsfml\system\thread.d(35): Error: module thread cannot read file 'std\thread.d'
So apparently DSFML is trying to import this thread.d from Phobos; It doesn't exist. What gives?
-
Did you check if it exists?
What version of DMD are you using?
What version of SFML are you using?
-
Yes, I checked, it doesn't exist.
Using latest versions of everything (DMD 2.029, DSFML from SVN).
module dsfml.system.thread;
version(Tango)
{
static import tango.core.Thread;
alias tango.core.Thread.Thread DThread;
}
else
{
static import std.thread;
alias std.thread.Thread DThread;
}
[...]
-
Okay; try changing that line to core.thread, and anything else that references std.thread.whatever, change std to core.
If you go to the change log for DMD 2.020, (http://www.digitalmars.com/d/2.0/changelog.html#new2_020) you can see that "import std.thread" was changed to "import core.thread".
And, there is a DMD 2.030 out now, so you might want to get that.
-
This is real old code and probably didn't target D2 at all.
Phobos2 was ported to be based on druntime, so it's in core now as already stated.
-
Yeah, you also need to replace all the char[]s with string, there are issues with opEquals and so on.