c++ - Cmake linking error CLion -


i making nana project when try link cmake in clion maybe bug cmake file

project(nanagui) cmake_minimum_required(version 2.9) set(cmake_cxx_standard 17) set(source_files main.cpp) set(nana_include nana) set(nana_filesystem_force 1) set(nana_library_d libnana_d.a) include_directories(include) add_executable(nanagui ${source_files}) #add_library(nana_library_d libnana_d.a) #set (cmake_exe_linker_flags -l libnana_d.a ) target_link_libraries(nanagui "${nana_library_d}") 

and error

"c:\program files\cmake\bin\cmake.exe" --build c:\users\arllk\clionprojects\nanagui\cmake-build-debug --target nanagui -- -j 2 [ 50%] building cxx object cmakefiles/nanagui.dir/main.cpp.obj [100%] linking cxx executable nanagui.exe c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llibnana_d collect2.exe: error: ld returned 1 exit status mingw32-make.exe[3]: *** [cmakefiles\nanagui.dir\build.make:97: nanagui.exe] error 1 mingw32-make.exe[2]: *** [cmakefiles\makefile2:67: cmakefiles/nanagui.dir/all] error 2 mingw32-make.exe[1]: *** [cmakefiles\makefile2:79: cmakefiles/nanagui.dir/rule] error 2 mingw32-make.exe: *** [makefile:117: nanagui] error 2 

i see fault in

cannot find -llibnana_d

but cant se way avoid -l join name of libnana_d


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -