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

Author Topic: Anybody using DSFML/DSFML2?  (Read 56966 times)

0 Members and 1 Guest are viewing this topic.

AndrejM

  • Newbie
  • *
  • Posts: 29
    • View Profile
Anybody using DSFML/DSFML2?
« Reply #45 on: September 08, 2010, 06:30:29 pm »
Quote from: "Trass3r"
Why would you want to build it?
I thought building the samples with xfbuild worked for you?

Sorry for that brainfart. I initially thought I needed an import library, but DSFML uses dynamic loading but on application startup (is that correct?).

So I don't need to create any import libraries (and really I wasn't creating an import lib, that build script only creates a static library..).

It's really interesting how you've combined the use of mixins with DLL loading. :)

AndrejM

  • Newbie
  • *
  • Posts: 29
    • View Profile
Anybody using DSFML/DSFML2?
« Reply #46 on: September 08, 2010, 07:37:05 pm »
The build errors for the dfl example seem to be coming from DFL unable to link to DSFML modules, I dunno why.. But expanding the build call from dfl and using it with xfbuild instead will compile the example.

I get a window with a nice 3d cube, and I can select mouse or keyboard input, but nothing seems to react to the mouse or keyboard. But at least the example doesn't crash. :)

Anyway, here's my batch file to build samples\dfl\dflsample.d:

Code: [Select]

@echo off
setlocal EnableDelayedExpansion
set "files="
set "derelict_libfiles="

REM ~ Configure these as needed:
set "dfl_import=C:\dfl\import"
set "dfl_lib=C:\DMD\dmd2\windows\lib\dfl.lib"
set "derelict_dir=..\..\..\lib\derelict"

for %%i in (*.d) do set files=!files! %%i
for %%i in (%derelict_dir%\*.lib) do set derelict_libfiles=!derelict_libfiles! %%i

@echo on

xfbuild %files% +v +xcore +xstd +o..\bin\ -release -O -inline -I..\..\..\import -I%dfl_import% -L/exet:nt/su:windows:4.0 %dfl_lib% -version=DFL_EXE %derelict_libfiles%

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Anybody using DSFML/DSFML2?
« Reply #47 on: September 12, 2010, 10:24:00 pm »
Quote from: "AndrejM"
Sorry for that brainfart. I initially thought I needed an import library, but DSFML uses dynamic loading but on application startup (is that correct?).

So I don't need to create any import libraries (and really I wasn't creating an import lib, that build script only creates a static library..).

It's really interesting how you've combined the use of mixins with DLL loading. :)

Yeah, dll loading is done dynamically at program startup. It's a bit of a construction site. Some time ago I thought about replacing it with static linking but in the end I do need function pointers to do the magic behind simulated class inheritance (see Drawable implementation)

Thank you for your work on the DFL example. I don't have much time at the moment but while still try to fold your changes in :)

Klaim

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Anybody using DSFML/DSFML2?
« Reply #48 on: October 29, 2010, 09:04:19 pm »
Hi

I'm starting to get interested in trying to make something in D.

I wanted to use something like SFML so it's a good thing that there is a port!

Now I just need to know if it's compatible with the last dmd? I want to get with D2.

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Anybody using DSFML/DSFML2?
« Reply #49 on: October 30, 2010, 02:29:33 am »
It's targeted at D2.

Klaim

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Anybody using DSFML/DSFML2?
« Reply #50 on: November 02, 2010, 05:20:35 pm »
Perfect! Thanks!

vuonmatong

  • Newbie
  • *
  • Posts: 1
  • vuon mat ong
    • View Profile
    • Email
Re: Anybody using DSFML/DSFML2?
« Reply #51 on: June 13, 2017, 06:50:48 am »
Although I think you should keep on developing this, one day when D gets more fame surely this will come in handy!