Search code examples
c++linuxeclipsesfmlnvcc

Using SFML in Eclipse (Linux)


I'm trying to get SFML (www.sfml-dev.org) running under Eclipse which is running on Ubuntu 16.04, my c++ compiler is nvcc as this is a cuda project. I have my includes and libraries set up as follows:

enter image description here

enter image description here

The project builds fine, but when I run it I get the error message:

error while loading shared libraries: libsfml-window.so.2.4: cannot open shared object file: No such file or directory

This is weird, because the file exists (/home/timo/cuda-workspace/CudaTutorial/SFML/lib). Does anyone know how I can resolve this issue?


Solution

  • Well, in the end creating a conf file did it:

    gksudo gedit /etc/ld.so.conf.d/sfml.conf
    /lib/SFML/lib
    sudo ldconfig
    

    (I put the SFML build into lib in case I want to use it in another project).