SFML community forums

Bindings - other languages => D => Topic started by: Core Xii on May 25, 2009, 05:29:57 pm

Title: std\thread.d
Post by: Core Xii on May 25, 2009, 05:29:57 pm
Quote
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?
Title: std\thread.d
Post by: michaelp on May 30, 2009, 06:40:38 pm
Did you check if it exists?
What version of DMD are you using?
What version of SFML are you using?
Title: std\thread.d
Post by: Core Xii on May 31, 2009, 12:29:30 am
Yes, I checked, it doesn't exist.

Using latest versions of everything (DMD 2.029, DSFML from SVN).

Quote
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;
}

[...]
Title: std\thread.d
Post by: michaelp on May 31, 2009, 02:22:04 am
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.
Title: std\thread.d
Post by: Trass3r on December 28, 2009, 04:08:30 pm
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.
Title: std\thread.d
Post by: Trass3r on January 05, 2010, 09:44:26 pm
Yeah, you also need to replace all the char[]s with string, there are issues with opEquals and so on.