Hello everyone,
I have encountered a strange problem recently while trying to configure CLion with SFML on Windows.
I did it many times and it worked perfectly but now I am getting many problems such:
undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
Whole list of that problems. I know it is the problem with linking but I don't know why.
SFML is detected by CMake, the same version of SFML works in Visual Studio.
FindSFML.cmake is original from SFML package downloaded.
Here is my CMakeLists.txt:
cmake_minimum_required(VERSION 3.7)
project(untitled)
set(CMAKE_CXX_STANDARD 14)
set(SOURCE_FILES main.cpp)
set(SFML_ROOT "D:/Development/SFML-2.4.2")
add_executable(untitled ${SOURCE_FILES})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML REQUIRED COMPONENTS audio graphics window system)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(untitled ${SFML_LIBRARIES})
endif()