This question has already been answered:
- Link to unresolved external symbol (possible reasons) 2 responses
- CMake - no libconfig link 2 answers
I can not connect PDcurses to a C ++ project. After compilation we get the files panel.a , pdcurses.a and curses.h . How to attach them to the project, to finally get rid of the error
undefined reference to function
I tried several options for calling various functions in CMake.txt , but none of them came up. Solution of the problem is required using Cmake.txt - it would be the most correct way out.
Original CMake.txt content:
cmake_minimum_required(VERSION 3.6) project(RogueLike) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCE_FILES main.cpp) add_executable(RogueLike ${SOURCE_FILES}) CMake version: 3.6, IDE: JetBrains CLion
cmake, but the problem is precisely in the absence of a linker specifying the required library. In any case, I can no longer re-vote on a duplicate, only if I canceled my vote for closing at all. - αλεχολυτ