I included
library in my source code. But I get compilation errors.
Error:
**undefined reference to \'sqrt\'
**undefined referen
I found answer. Cmakelists.txt file is like it:
cmake_minimum_required(VERSION 3.6)
project(project_name)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")
set(SOURCE_FILES main.c)
add_executable(project_name ${SOURCE_FILES})
And you must add this command, for
target_link_libraries(project_name PRIVATE m)
That's all.