1

Im trying to build my first project with the nana gui lib. I never really worked with other libraries and thus have no experience with cmake.

I installed the library using cmake, make, make install and got through with not error.

When trying to compile the starter project I get some errors

[ 50%] Building CXX object CmakeFiles /NanaProTest.dir/main.cpp.o

[100%] Linking CXX executable NanaProTest CmakeFiles

/NanaProTest.dir/main.cpp.o: In function 'main':

/home/xxx/CLionProjects/NanaProTest/main.cpp:6 undefined reference to 'nana::appearance::appearance()' /home/

local/include/nana/gui/widgets/form.hpp:63 undefined reference to 'nana::API::make_center(unsigned int, unsigned int)'

...

My current CMakeLists.txt looks like this

cmake_minimum_required(VERSION 3.7)
project(NanaProTest)
set(CMAKE_CXX_STANDARD 14)
include_directories(/home/xxx/libs/nana/source)
add_executable(NanaProTest main.cpp)

Im pretty sure I need to add something to my CMakeLists.txt but I cant figure out what.

Narase
  • 490
  • 2
  • 12

0 Answers0