SFML community forums

Help => General => Topic started by: marmal102 on March 26, 2017, 10:52:30 am

Title: Problem with Release build on Linux
Post by: marmal102 on March 26, 2017, 10:52:30 am
Hello everyone,

I've had some problem with my SFML on Linux for some time.
I used SFML installed from my distro repository so far and everything worked well, but now I had to download the latest version of SFML so I downloaded source code and compiled it with CMake(since the already compiled didn't suit for me).

Now when I try to build my project using CLion in Debug mode - compilation goes successfully but when I try to build it in Release mode I get following error:
No rule to make target '/usr/lib/x86_64-linux-gnu/libsfml-system.so'.

My FindSFML.cmake is okay I guess, I used that one from source code, and it works in Debug Mode.

I would be grateful for any help.
Title: Re: Problem with Release build on Linux
Post by: Mario on March 26, 2017, 02:37:44 pm
Any chance you forgot installing the release build?
Title: Re: Problem with Release build on Linux
Post by: marmal102 on March 27, 2017, 08:54:34 am
Unfortunately not, there are both Debug and Release.
Title: Re: Problem with Release build on Linux
Post by: Laurent on March 27, 2017, 09:12:36 am
Can you show us your project file (don't know if it's pure CMake or if CLion has its own format)?
Title: Re: Problem with Release build on Linux
Post by: marmal102 on March 28, 2017, 12:50:37 pm
cmake_minimum_required(VERSION 3.6)
project(Enyo)

set(CMAKE_CXX_STANDARD 14)
include_directories(include)

set(SOURCE_FILES main.cpp)
add_executable(Test ${SOURCE_FILES})

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML REQUIRED system window graphics network audio)
if (SFML_FOUND)
    include_directories(${SFML_INCLUDE_DIR})
    target_link_libraries(Enyo ${SFML_LIBRARIES})
endif ()

In directory cmake_modules there is file FindSFML.cmake that is included to source code of SFML.
Title: Re: Problem with Release build on Linux
Post by: marmal102 on March 30, 2017, 12:38:03 pm
No idea? :(
Title: Re: Problem with Release build on Linux
Post by: Laurent on March 30, 2017, 12:46:43 pm
No, sorry. Everything looks ok.
Title: Re: Problem with Release build on Linux
Post by: Mario on March 30, 2017, 10:59:45 pm
Could you check whether the actual file exists? And how about the others (like sfml-graphics)? Or maybe there are the debug copies only? And are the files accessible by your user?
Title: Re: Problem with Release build on Linux
Post by: marmal102 on April 01, 2017, 01:19:12 pm
After myself compilation and installation SFML library I have both the same files for debug and release in: /usr/local/include and lib.

But... There is no such file like: '/usr/lib/x86_64-linux-gnu/libsfml-system.so' whatever it is.