Linking SDL2 and Clion
问题 I have clion pointing to SDL2 directories and libs, but it fails to link the libraries when I try to build. Any ideas on how to fix this? CMakeLists: cmake_minimum_required(VERSION 3.3) project(cavestory_development) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -lSDL2") set(SDL2_INCLUDE_DIR C:/SDL2-2.0.3/i686-w64-mingw32/include/SDL2) set(SDL2_LIBRARY C:/SDL2-2.0.3/i686-w64-mingw32/lib) find_package(SDL2 REQUIRED) include_directories(${SDL2_INCLUDE_DIR}) set(SOURCE_FILES main.cpp) add