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.


Topics - mouse_poet

Pages: [1]
1
D / Trouble Linking DSFML...
« on: February 04, 2015, 10:25:28 am »
I'm having trouble getting DSFML to link up correctly in Code::Blocks on my Linux Mint 17 x64 machine. I've tried building everything from source as per the tutorial(s) because I couldn't get the Nightlies to work, but to be honest I'm not really sure what I'm doing so I could be screwing up there without knowing it. Mainly I think I'm confused about what is referencing what in the tutorials and how I'd translate that to build options in my IDE of choice.

So, just to clarify or correct me:
  • Download or otherwise have on system:
  • Build using guide: https://github.com/Jebbs/DSFML/wiki/Building-DSFML-Libraries-From-Source%28Linux%29
    • Build SFML 2.0 static library as per these instructions http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php
      Generator: Unix Makefiles
      Compiler: Default Native
      Uncheck BUILD_SHARED_LIBS for static libs
      (I have no idea where to put -fPIC, make won't accept it, not sure where to put it in the cmake-gui?)
      Run make in the terminal at build location
    • Take file "<SFML static build directory>/cmake/Modules/FindSFML.cmake" and put it in "/usr/share/cmake-2.8/Modules"
    • Build DSFML-C shared library using same technique as for SFML 2.0
      Generator: Unix Makefiles
      Compiler: Default Native
      Quote
      Don't forget to select a static link to the Standard Libraries again!
      I'm not on Windows so SFML_USE_STATIC_STD_LIBS isn't an option so I can't turn it on... oh well...
      Quote
      CMake will say that it needs to know where the SFML include directory is, as well as the SFML static libraries. Let the system know the locations of these and you should be all set.
      cmake says none of that .___.; no errors so let's push on...
      Check BUILD_SHARED_LIBS for shared libs (we want these ones to be shared, right??)
      Run make in the terminal at build location
    • Build DFSML using Step 1 of https://github.com/Jebbs/DSFML/wiki/Building-Your-First-DSFML-Program%28Windows%29
      In terminal at <DFSML source directory> run rdmd build.d
  • Setup IDE (Code::Blocks) borrowing info from: https://github.com/Jebbs/DSFML/wiki/Building-Your-First-DSFML-Program%28Windows%29
    • File>>New>>Project>>D application
    • Project>>Build Options
      • Compiler: DMD
      • >>Linker Settings>>Link Libraries
        • dsfml-graphics
        • dsfml-system
        • dsfml-window
        • dsfml-audio
        • dsfml-network
        • dsfml-graphics-2
        • dsfml-system-2
        • dsfml-window-2
        • dsfml-audio-2
        • dsfml-network-2
      • >>Search Directories
        • >>Compiler
          • <DSFML source directory>/src
        • >>Linker
          • <DSFML source directory>/lib
          • <DSFML-C shared lib directory>/lib
    • Add main.d to project
      Add some code to file.
    • Build + Run Project
      All should work? Yes?
    • After weeks of trying and fiddling around with what links where and rebuilding everything ask internet for help...

I'm probably just missing something really simple and I've just misunderstood a part of something somewhere... If someone could show me where I'm going wrong that'd be a big help!

Pages: [1]