Welcome, Guest. Please login or register.

Author Topic: How to install on Linux?  (Read 312 times)

0 Members and 1 Guest are viewing this topic.

picnic

  • Newbie
  • *
  • Posts: 5
    • View Profile
How to install on Linux?
« on: April 03, 2016, 09:10:40 pm »
I'm confused!  ??? Reading this page: http://jebbs.github.io/DSFML/docs/firstprogram.html it says that the easiest way to get DSFML and DSFMLC is by downloading the binaries and putting them on your path. However, the download page only has the DSFML archive, although the DSFMLC source is available at the bottom of that page.

So my question is, if I download DSFMLC and build that, then download the DSFML archive and extract it to my application's directory, should the example mentioned on the previously mentioned page build like this if I substitute the full path to the DSFML and DSFMLC folders:

dmd app.d -IDSFML/scr -L-LDSFMLC/lib -L-LDSFML/lib -L-ldsfml-graphics -L-ldsfml-window -L-ldsfml-system -L-ldsfmlc-graphics -L-ldsfmlc-window -L-ldsfmlc-system

I just can't get it to work :(

(I've corrected the typo dmd app.d -IDSFML/scr... to dmd app.d -IDSFML/src and still no joy.)

Any help much appreciated.

EDIT: I should maybe have said that I installed SFML and can compile the example C++ programs without any issues at all but would prefer to use 'D'.
« Last Edit: April 04, 2016, 10:22:49 am by picnic »

picnic

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to install on Linux?
« Reply #1 on: April 04, 2016, 11:15:55 am »
I've tried installing on a different Linux Mint machine and this is how it went:

cmake:
-- Build files have been written to: /home/paul/Desktop/DSFMLC

make:
builds and links everything ok


sudo make install:
installs everything ok

I unzipped the DSFML binaries archive into /home/paul/test/DSFML, created app.d with the example code for the smiley face, then executed the following:
Code: [Select]
dmd app.d -I/home/paul/test/DSFML/src -L-L/home/paul/test/DSFML/lib -L-L/home/paul/test/DSFML/lib -L-ldsfml-graphics -L-ldsfml-window -L-ldsfml-system -L-ldsfmlc-graphics -L-ldsfmlc-window -L-ldsfmlc-system

Which gives me this horrible series of messages:
Code: [Select]
/home/paul/test/DSFML/lib/libdsfml-graphics.a(renderwindow_1_4d8.o): In function `_D5dsfml8graphics12renderwindow12RenderWindow8setTitleMFAyaZv':
src/dsfml/graphics/renderwindow.d:(.text._D5dsfml8graphics12renderwindow12RenderWindow8setTitleMFAyaZv+0x10): undefined reference to `_D3std3utf7toUTF32FNaNfxAaZAyw'
/home/paul/test/DSFML/lib/libdsfml-graphics.a(renderwindow_1_4d8.o): In function `_D5dsfml8graphics12renderwindow12RenderWindow8setTitleMFAyuZv':
src/dsfml/graphics/renderwindow.d:(.text._D5dsfml8graphics12renderwindow12RenderWindow8setTitleMFAyuZv+0x10): undefined reference to `_D3std3utf7toUTF32FNaNfxAuZAyw'
/home/paul/test/DSFML/lib/libdsfml-graphics.a(renderwindow_1_4d8.o): In function `_D5dsfml8graphics12renderwindow12RenderWindow6createMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv':
src/dsfml/graphics/renderwindow.d:(.text._D5dsfml8graphics12renderwindow12RenderWindow6createMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv+0x25): undefined reference to `_D3std3utf7toUTF32FNaNfxAaZAyw'
/home/paul/test/DSFML/lib/libdsfml-graphics.a(renderwindow_1_4d8.o): In function `_D5dsfml8graphics12renderwindow12RenderWindow6createMFS5dsfml6window9videomode9VideoModeAyuE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv':
src/dsfml/graphics/renderwindow.d:(.text._D5dsfml8graphics12renderwindow12RenderWindow6createMFS5dsfml6window9videomode9VideoModeAyuE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv+0x25): undefined reference to `_D3std3utf7toUTF32FNaNfxAuZAyw'
/home/paul/test/DSFML/lib/libdsfml-window.a(window_4c_278.o): In function `_D5dsfml6window6window6Window8setTitleMFAyaZv':
src/dsfml/window/window.d:(.text._D5dsfml6window6window6Window8setTitleMFAyaZv+0x10): undefined reference to `_D3std3utf7toUTF32FNaNfxAaZAyw'
/home/paul/test/DSFML/lib/libdsfml-window.a(window_4c_278.o): In function `_D5dsfml6window6window6Window8setTitleMFAyuZv':
src/dsfml/window/window.d:(.text._D5dsfml6window6window6Window8setTitleMFAyuZv+0x10): undefined reference to `_D3std3utf7toUTF32FNaNfxAuZAyw'
/home/paul/test/DSFML/lib/libdsfml-window.a(window_4c_278.o): In function `_D5dsfml6window6window6Window6createMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv':
src/dsfml/window/window.d:(.text._D5dsfml6window6window6Window6createMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv+0x25): undefined reference to `_D3std3utf7toUTF32FNaNfxAaZAyw'
/home/paul/test/DSFML/lib/libdsfml-window.a(window_4c_278.o): In function `_D5dsfml6window6window6Window6createMFS5dsfml6window9videomode9VideoModeAyuE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv':
src/dsfml/window/window.d:(.text._D5dsfml6window6window6Window6createMFS5dsfml6window9videomode9VideoModeAyuE5dsfml6window6window6Window5StyleKxS5dsfml6window15contextsettings15ContextSettingsZv+0x25): undefined reference to `_D3std3utf7toUTF32FNaNfxAuZAyw'
collect2: error: ld returned 1 exit status
--- errorlevel 1

I'm stumped!

picnic

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to install on Linux?
« Reply #2 on: April 04, 2016, 02:11:41 pm »
The second part of the command as I entered it was wrong - it should be pointing at the DSFMLC libs so I changed it as follows (having placed the DSFMLC folder in my application folder) :
Code: [Select]
dmd app.d -I/home/paul/test/DSFML/src -L-L/home/paul/test/DSFMLC/lib -L-L/home/paul/test/DSFML/lib -L-ldsfml-graphics -L-ldsfml-window -L-ldsfml-system -L-ldsfmlc-graphics -L-ldsfmlc-window -L-ldsfmlc-system

Still no joy, undefined reference errors.

 

anything