SFML community forums

Bindings - other languages => D => Topic started by: pataoulta on June 13, 2016, 09:14:35 pm

Title: DSFML compiling problem
Post by: pataoulta on June 13, 2016, 09:14:35 pm
Hello! Yes, I know this is probably a very basic issue. Although I've been very curious as in why does this.. not work? I've been bugging myself for an entire day, even if it may sound funny.. However I managed to compile this before, but it doesn't seem to work now, for some reason..

Basically I built DSFML and DSFMLC from source. Then I proceeded to build an example, app.d..
It imports dsfml.graphics. Then it simply displays a green face with two blue eyes and a red smile.

However, for some reason it won't compile now. It tells me the following error.
"app.d(3):Error: module graphics is in file "dsfml\graphics.d" which cannot be read
import path[0] = DSFML\src\
import path[1] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[2] = C:\D\dmd2\windows\bin\..\..\src\druntime\import

The code (app.d)
(click to show/hide)

The arguments:
(click to show/hide)

I also put DSFMLC\lib, DSFML\lib and DSFML\src (DSFML and DSFMLC are located on my C:) into my PATH.
Can anyone please help? I'd appreciate it.
Title: Re: DSFML compiling problem
Post by: Jebbs on June 26, 2016, 07:19:21 am
What command did you use to build?
Title: Re: DSFML compiling problem
Post by: mtn on September 16, 2017, 11:14:16 am
It seems not to be the solution for the OP, and i'm late, but searching for the error got me here.
There is a typo on this site: http://dsfml.com/docs/firstprogram.html (http://dsfml.com/docs/firstprogram.html)
On OS X and Linux

dmd app.d -IDSFML/scr  ...
'scr' should be 'src' instead, couldn't spot it by eye.