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

Author Topic: Can't build with DSFML2  (Read 8142 times)

0 Members and 1 Guest are viewing this topic.

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Can't build with DSFML2
« on: March 22, 2011, 09:55:43 pm »
I'm running on 64-bit Ubuntu Linux with dmd v2.052, and I'm having trouble getting any project with DSFML2 working (revision 1814).

I built the SFML and CSFML libraries using shared libs + release builds, and installed them, then built the DSFML bindings like this:

Code: [Select]

me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/system$ dmd -m64 -lib *.d -of../../../lib/libdsfml-system.a
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/system$ cd ../window
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/window$ dmd -m64 -lib *.d -of../../../lib/libdsfml-window.a
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/window$ cd ../graphics
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/graphics$ dmd -m64 -lib *.d -of../../../lib/libdsfml-graphics.a
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/graphics$ cd ../audio
me@lappy486:~/devl/sfml2/bindings/d/import/dsfml/audio$ dmd -m64 -lib *.d -of../../../lib/libdsfml-audio.a


When trying to build a project to use them, I get the following errors:

Code: [Select]

me@lappy486:~/devl/d/Gossamer$ dmd -m64 *.d game/*.d graphics/*.d -L"-L/home/me/devl/sfml2/bindings/d/lib -ldsfml-system -ldsfml-window -ldsfml-graphics -ldsfml-audio"
collision.o:(.data+0xab0): undefined reference to `_D5dsfml8graphics5color12__ModuleInfoZ'
collision.o:(.data+0xb18): undefined reference to `_D5dsfml6system9exception16LoadingException7__ClassZ'
collision.o:(.data+0xbe0): undefined reference to `_D5dsfml8graphics3all12__ModuleInfoZ'
collision.o:(.data+0xd38): undefined reference to `_D5dsfml8graphics3all12__ModuleInfoZ'
collision.o:(.data+0xd40): undefined reference to `_D5dsfml6window3all12__ModuleInfoZ'
collision.o:(.data+0xdd8): undefined reference to `_D5dsfml6system9exception16LoadingException7__ClassZ'
collision.o:(.data+0xf40): undefined reference to `_D5dsfml8graphics3all12__ModuleInfoZ'
collision.o: In function `_D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image':
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0x17): undefined reference to `_D5dsfml8graphics6sprite6Sprite7__ClassZ'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0x2a): undefined reference to `_D5dsfml8graphics5image5Image7__ClassZ'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0x67): undefined reference to `_D5dsfml8graphics5image5Image6__ctorMFAyaZC5dsfml8graphics5image5Image'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0xa3): undefined reference to `_D5dsfml8graphics5color4RGBA5WHITEyS5dsfml8graphics5color4RGBA'
graphics/text.d:(.text._D8graphics5image5Image6__ctorMFAyaZC8graphics5image5Image+0xac): undefined reference to `_D5dsfml8graphics6sprite6Sprite6__ctorMFC5dsfml8graphics5image5ImagefffffS5dsfml8graphics5color4RGBAZC5dsfml8graphics6sprite6Sprite'
collision.o: In function `_D8graphics6screen6Screen5clearMFZv':
graphics/text.d:(.text._D8graphics6screen6Screen5clearMFZv+0xa): undefined reference to `_D5dsfml8graphics5color4RGBA5BLACKyS5dsfml8graphics5color4RGBA'
collision.o: In function `_D8graphics6screen6Screen6__ctorMFAyakkZC8graphics6screen6Screen':
graphics/text.d:(.text._D8graphics6screen6Screen6__ctorMFAyakkZC8graphics6screen6Screen+0x24): undefined reference to `_D5dsfml8graphics12renderwindow12RenderWindow7__ClassZ'
graphics/text.d:(.text._D8graphics6screen6Screen6__ctorMFAyakkZC8graphics6screen6Screen+0x73): undefined reference to `_D5dsfml8graphics12renderwindow12RenderWindow6__ctorMFS5dsfml6window9videomode9VideoModeAyaE5dsfml6window6window5StyleS5dsfml6window6window15ContextSettingsZC5dsfml8graphics12renderwindow12RenderWindow'
collision.o: In function `_D8graphics4text4Font6__ctorMFAyaZC8graphics4text4Font':
graphics/text.d:(.text._D8graphics4text4Font6__ctorMFAyaZC8graphics4text4Font+0x17): undefined reference to `_D5dsfml8graphics4font4Font7__ClassZ'
graphics/text.d:(.text._D8graphics4text4Font6__ctorMFAyaZC8graphics4text4Font+0x54): undefined reference to `_D5dsfml8graphics4font4Font6__ctorMFAyaZC5dsfml8graphics4font4Font'
collision.o: In function `_D8graphics4text4Text6__ctorMFC8graphics4text4FontAyakS5dsfml8graphics5color4RGBAZC8graphics4text4Text':
graphics/text.d:(.text._D8graphics4text4Text6__ctorMFC8graphics4text4FontAyakS5dsfml8graphics5color4RGBAZC8graphics4text4Text+0x19): undefined reference to `_D5dsfml8graphics4text4Text7__ClassZ'
graphics/text.d:(.text._D8graphics4text4Text6__ctorMFC8graphics4text4FontAyakS5dsfml8graphics5color4RGBAZC8graphics4text4Text+0x3b): undefined reference to `_D5dsfml8graphics4text4Text6__ctorMFAyaC5dsfml8graphics4font4FontkZC5dsfml8graphics4text4Text'
collect2: ld returned 1 exit status
--- errorlevel 1


Can somebody help with this? I haven't been able to get it to work.

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Can't build with DSFML2
« Reply #1 on: April 16, 2011, 09:09:17 pm »
Bump..

NewbyProgrammer

  • Newbie
  • *
  • Posts: 1
    • View Profile
Can't build with DSFML2
« Reply #2 on: April 18, 2011, 05:54:28 am »
I also can't get it to work.

zlasher

  • Newbie
  • *
  • Posts: 2
    • View Profile
Can't build with DSFML2
« Reply #3 on: May 10, 2011, 05:06:16 pm »
Did you get it to work? I'm currently going through the same thing.
Would be nice if someone could write a tutorial how to use DSFML2.

 

anything