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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AndrejM

Pages: 1 [2]
16
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 07:46:24 pm »
Quote from: "Trass3r"
I had weird errors in some projects that were solved by excluding them.
Furthermore Phobos is already precompiled so I don't know if it makes any sense at all not to exclude them.

Ah, ok.

Is the network package operational? I can't get that to compile. And I saw some weird method definitions, such as:

Code: [Select]
void add(T socket)


I guess this was supossed to be a template but was never completed?

17
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 07:36:51 pm »
Quote from: "Trass3r"
Dunno, at least they are listed there: http://bitbucket.org/h3r3tic/xfbuild/wiki/Home
Although they say it's +x=pck instead of +xpck :?:

Oops, I thought those two were some options that enable multicore compilation or something, I didn't realize it's the package exclusion option.

I do compile fine without excluding those packages, at least in the pong example. Why do you exclude them?

18
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 07:23:46 pm »
One more thing: Where did you find about those +xstd and +xcore flags? I don't see them listed when using xfbuild --help ?

19
D / Anybody using DSFML/DSFML2?
« on: August 24, 2010, 07:13:51 pm »
Quote from: "Trass3r"
Ok, btw Laurent is currently switching over to CMake.


So this means DFSML will need those CMakeLists.txt files now? I've never used CMake before, right now I'm compiling like so:

Code: [Select]

xfbuild pong.d +v +xcore +xstd +o..\bin\ -release -O -inline -I..\..\..\import


I've noticed something in your debug build command you've posted earlier:
Quote from: "Trass3r"
Nothing fancy:
Code: [Select]
xfbuild main.d +v +xcore +xstd +obin\OpenBB-d -wi -unittest -debug -g


-d is a compiler switch that enables deprecated features. Did you want to compile with -d, or are you just using that extension as a naming convention for debug builds (the command above just glues -d to the name)?

20
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 11:26:47 pm »
Quote from: "Trass3r"
Quote from: "AndrejM"
Hmm. Yeah it's weird I compiled it without xfbuild and it immediately makes me either loose or win. But I've recompiled again with xfbuild and I can actually play now (yay!).

That sounds completely weird. Could you post the dmd commandline you used?


I'm not sure, I forgot to take a note, sorry. But I also recompiled the .dll's using the batch file that comes with SFML, so it was probably a mistake on my part when I was moving dll's round and about.

Quote from: "Trass3r"

Which OS/HW configuration?

XP32
AMD Athlon II X4 620 @ 2.6Ghz
3GB DDR2 400Mhz
GeForce 9600 GT

The GPU and Ram is pretty old already but I'm fine with that. A modern game like Dirt 2 runs perfectly fine on 1680x1050, which is my max resolution. It does get a little laggy with a lot of antialiasing, but that's expected with an older GPU I guess.

21
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 11:01:49 pm »
Btw I get ~6000 FPS on average. D is damn fast, eh? :lol:

22
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 11:00:32 pm »
Quote from: "Trass3r"
Yeah you gotta be fast so you don't lose immediately :D


Hmm. Yeah it's weird I compiled it without xfbuild and it immediately makes me either loose or win. But I've recompiled again with xfbuild and I can actually play now (yay!).

Quote from: "Trass3r"

Do you have any details regarding the exiting error?
I think in some rare cases access violations occur. I couldn't really track it down yet. Order of static destructor calls could be one issue.

The whole internal csfml handling is a big issue I haven't really solved/decided yet.


Just this:
---------------------------
pong.exe - Application Error
---------------------------
The instruction at "0x6b6252ba" referenced memory at "0x01b1bb78". The memory could not be "read".

I haven't set up a debugger for D yet (not like there's much D2 debuggers out there), so I can't tell you more. Maybe I've screwed up some method call, I'll do a diff with the original and refactor again, this time properly renaming the methods, and I'll try other examples if they crash or not on exit.

23
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 08:24:24 pm »
Quote from: "Trass3r"
Yeah, unfortunately. There's no way to access the SFML C++ code directly.
So CSFML provides C functions to access the internal SFML code.

That sfMusic error is known and actually no real error. The dll loading code is auto-generated.
The 2nd SSE error is a unittest failure cause the SSE sqrt is only a rough approximation. I need to loosen the checked condition.

Both errors shouldn't occur in release mode (i.e. with -release -O -inline instead of -debug -g -unittest).

Aha! It compiles and runs now. I had to copy the bin files with some data stuff but that's okay. I'll have to fix the module though, as soon as I run the game I loose the round, and at exit I get an invalid memory reference error.

But at least we're going somewhere.. Thanks for the help, I'll see if I can fix these samples somehow.

24
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 07:38:27 pm »
This is kind of difficult to compile.  :)

So basically, CSFML is dependent on SFML, and DFSM is a wrapper for CSFML, have I got that right?

I can now compile with xfbuild but I get a runtime error:
Loading error. Reason : Symbol cannot be found in specified library (library : csfml-audio-d.dll, symbol : sfMusic_Create)
core.exception.AssertError@dsfml\system\vector.d(371): SSE length calculation failed

Grepping through the source finds these methods:
C:\sfml2\CSFML\include\SFML\Audio\Music.h:44:CSFML_API sfMusic* sfMusic_CreateFromFile(const char* filename);
C:\sfml2\CSFML\include\SFML\Audio\Music.h:55:CSFML_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes);
C:\sfml2\CSFML\src\SFML\Audio\Music.cpp:36:sfMusic* sfMusic_CreateFromFile(const char* filename)
C:\sfml2\CSFML\src\SFML\Audio\Music.cpp:53:sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes)

I'll try writing a simpler example, maybe I haven't built properly or something.

25
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 01:41:38 pm »
Yeah I'm just trying out the pong sample, I've fixed (hopefully) all the problems in the code, and the imports work fine. But I can't get optlink link with the libraries. I keep getting back undefined symbol errors.. so I guess I have to manually pass the lib directory to optlink, but I'm not having much success.

What's your build command (xfbuild/dmd), pretty please?

26
D / Anybody using DSFML/DSFML2?
« on: August 23, 2010, 12:57:04 am »
I can almost get some of the samples working by manually fixing the calls to several property methods which have been renamed. But in many cases I end up with this particular call in the client code:

Code: [Select]
Input i = app.getInput();

where app is a RenderWindow object. There's no getInput or any similar methods in that class (and I've tried them all just to check), so I'm not sure what to call instead. I don't see an equivalent method in the Input class either.

27
D / DSFML and dsss didn't work :/
« 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.

28
D / DSFML and dsss didn't work :/
« 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?

29
D / DSFML and dsss didn't work :/
« 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.

Pages: 1 [2]