Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: DSFML and dsss didn't work :/  (Read 7837 times)

0 Members and 1 Guest are viewing this topic.

mutable

  • Newbie
  • *
  • Posts: 2
    • View Profile
DSFML and dsss didn't work :/
« on: June 18, 2010, 01:31:49 am »
I just downloaded DFML under the following link
http://downloads.sourceforge.net/sfml/SFML-1.3-d-sdk-windows.zip
 and filed it in C:/D/DFML/.
After that I downloaded dsss and filed it in C:/D/dss and inserted it in my environment variables (%PATH%) in Windows so that I could give instructions from the cmd.exe, and that works so far.
Now I applied a dsss.conf data file and filed it in a test directory on my desktop in the folder D, which inhabites my test datas of d.

I have the following source code:
Code: [Select]

module veryquickstart;

import dsfml.system.all;
import dsfml.window.all;
import dsfml.graphics.all;

void main()
{
    RenderWindow app = new RenderWindow(VideoMode(800, 600, 32), "It works !");
    Shape s = Shape.circle(300.f, 300.f, 100.f, Color(120, 120, 120, 120));
    app.setFramerateLimit(100);
   
    Event evt;  
    while (app.isOpened())
    {
        while (app.getEvent(evt))
        {
            // close the window
            if ((evt.Type == Event.EventType.CLOSED) ||
               ((evt.Type == Event.EventType.KEYPRESSED) && (evt.Key.Code == KeyCode.ESCAPE)))
            {
                app.close();
                break;
            }        
        }

        s.move(0.1f, 0);
       
        app.draw(s);
        app.display();
    }
}

and the following dsss.conf data file:
Code: [Select]

[sfml_test.d]
buildflags += -Ic:\D\DSFML\import -Sc:\D\DSFML\extlibs\lib

 but I'm consistently getting the same error message if i try to put "dsss build" into the cmd.exe:
Quote

C:\Users\---\Desktop\D main\D>dsss build
sfml_test.d => sfml_test
c:\D\DSFML\import\dsfml\system\thread.d(38): module thread cannot read file 'std
\thread.d'
Command C:\dsss\bin\rebuild.exe returned with code 1, aborting.
Error: Command failed, aborting.


Here the corresponding part from "thread.d, the lines 38 and 39:
Code: [Select]

    static import std.thread;
    alias std.thread.Thread DThread;

mutable

  • Newbie
  • *
  • Posts: 2
    • View Profile
DSFML and dsss didn't work :/
« Reply #1 on: June 18, 2010, 12:32:03 pm »
I found this thread http://www.sfml-dev.org/forum/viewtopic.php?t=1272 and changed also all std.thread lines into core.thread.
But now i get a lot of error messages and don't know what i can do -.-

I try also to compile the samples, for example pong, but i get this from the console:
Quote

C:\D\DSFML\samples\dsfml>dsss build pong
pong is not described in the configuration file.

C:\D\DSFML\samples\dsfml>dsss build pong/pong.d
pong\pong.d => bin/pong
../../import\dsfml\system\alloc.d(10): module gc cannot read file 'std\gc.d'
Command C:\D\dsss\bin\rebuild.exe returned with code 1, aborting.
Error: Command failed, aborting.


Know anybody what i do wrong?

edit:
i know it, std\gc.d are now core/memory.d.

Can anybody give me a newbie help to install dsss and dsfml with dmd 2.0?
I can't replace all the old code, it must exist an easier way :/

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML and dsss didn't work :/
« Reply #2 on: June 21, 2010, 03:17:38 pm »
Use (D)SFML2 from svn: http://sfml.svn.sourceforge.net/viewvc/sfml/branches/sfml2.tar.gz?view=tar

And don't use dsss. It's not maintained anymore and doesn't work that good with D2 (i.e. rebuild does not which is used by dsss).
You might try xfBuild: http://bitbucket.org/h3r3tic/xfbuild/wiki/Home

AndrejM

  • Newbie
  • *
  • Posts: 29
    • View Profile
DSFML and dsss didn't work :/
« Reply #3 on: July 04, 2010, 06:40:17 pm »
Quote from: "Trass3r"
Use (D)SFML2 from svn: http://sfml.svn.sourceforge.net/viewvc/sfml/branches/sfml2.tar.gz?view=tar

And don't use dsss. It's not maintained anymore and doesn't work that good with D2 (i.e. rebuild does not which is used by dsss).
You might try xfBuild: http://bitbucket.org/h3r3tic/xfbuild/wiki/Home

Hi, I'm just trying out the svn checkout from that link.

I'm getting template errors all around. Could you please specify which version of D2.x you are using, and the build options? Thanks.

I'm using v2.047, and was just trying out to build with xfBuild. The System subfolder compiles, but the others do not.

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML and dsss didn't work :/
« Reply #4 on: July 04, 2010, 09:46:41 pm »
I usually use the latest version.
What errors do you get?

btw, you should use +xcore +xstd options with xfbuild.

AndrejM

  • Newbie
  • *
  • Posts: 29
    • View Profile
DSFML and dsss didn't work :/
« Reply #5 on: July 05, 2010, 02:26:35 am »
Quote from: "Trass3r"
I usually use the latest version.
What errors do you get?

btw, you should use +xcore +xstd options with xfbuild.

That fixed it. But I'm having a hard time telling xfbuild to make a library in one go.

This will make the object files:
Code: [Select]
xfbuild all.d -I../../ +xcore +xstd

I've tried adding -lib but that won't do much good:
Code: [Select]
xfbuild all.d -I../../ +xcore +xstd -lib
Build failed: all.obj: The system cannot find the file specified.


I can manually invoke the linker, but xfbuild should be able to do this, no?

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML and dsss didn't work :/
« Reply #6 on: July 05, 2010, 11:45:21 am »
xfBuild is a bit strange in some ways (too many cooks spoil the broth)
It doesn't link anything without the +o option, yet there is a +nolink option :roll:

I'm not sure if it supports building a library, maybe if you combine +o... with -lib

Otherwise you might file a ticket http://bitbucket.org/h3r3tic/xfbuild/issues?status=new&status=open or modify it yourself.

AndrejM

  • Newbie
  • *
  • Posts: 29
    • View Profile
DSFML and dsss didn't work :/
« Reply #7 on: July 05, 2010, 05:47:44 pm »
Quote from: "Trass3r"
xfBuild is a bit strange in some ways (too many cooks spoil the broth)
It doesn't link anything without the +o option, yet there is a +nolink option :roll:

I'm not sure if it supports building a library, maybe if you combine +o... with -lib

Otherwise you might file a ticket http://bitbucket.org/h3r3tic/xfbuild/issues?status=new&status=open or modify it yourself.

I think dmd is confusing it. xfbuild is trying to link .obj files with the same name as the source files. But dmd names the .obj files according to the module declarations.

If I get it working I'll post the build commands.

 

anything