Skip to content

[FAQ] Compiling

Alexander Grund edited this page May 23, 2017 · 6 revisions

Windows

  1. How can I execute my self-compiled RTTR?
    Just run it from inside VS. The ALL_BUILD project should be selected as the start project (default) and is correctly set up for running/debugging. Outside of VS you have to set the execution directory to the build folder (create a shortcut and change its properties)

Linux

  1. I get missing dependencies when using CMake.
    Make sure you installed all required packages as listed in the install guide.

  2. I still get missing dependencies when using CMake but the missing ones are in /usr/lib/x86_64-linux-gnu folder
    You have to add this folder to CMAKE_PREFIX_PATH either via the environment variable, by passing it to CMake with -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu or by setting it in the GUI (cmake-gui) or ccmake

  3. I don't have/don't want to use the static boost libraries and don't want to build them myself
    You can use dynamic boost libraries too by setting the CMake variable USE_STATIC_BOOST to OFF (see above how)

  4. I'm getting errors like /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_filesystem.a(operations.o): relocation R_X86_64_32 against '__pthread_key_create@@GLIBC_2.2.5' can not be used when making a shared object; recompile with '-fPIC'
    Recompile boost with -fPIC or use dynamic boost libraries by setting USE_STATIC_BOOST to OFF

Mac OS X

  1. CMake cannot find gettext/msgmerge/msgfmt
    Make sure you installed gettext (e.g. via brew) and msgmerge and msgfmt are in your path. You can either use brew link --force gettext or export PATH="<path-to-msgmerge-bin-folder>:$PATH". Last option is setting the CMAKE_PREFIX_PATH like: ./cmake.sh ... -DCMAKE_PREFIX_PATH=/usr/local/opt/gettext (Adjust your path if necessary)
  2. CMake cannot find SDL This can happen if you have SDL2 installed too. You can make CMake find your version by setting SDLDIR to its path. E.g.: SDLDIR=/usr/local/opt/sdl ./cmake.sh ...