4
現在、ncursesで遊んでいます。 Ncursesは私がインストールしたライブラリです。自分のファイルではありません。私はすでにいくつかのことをしましたが、IDEを使用する方がはるかに簡単なので、CLionを使用することに決めました(私はLinux上でVisual Studioを使用できません)。CLion CMakeのリンクncurses
cmake_minimum_required(VERSION 3.6)
project(ncurses)
set(CMAKE_C_STANDARD "${CMAKE_C_FLAGS} -Wall -Werror -lpdcurses")
set(SOURCE_FILES main.cpp ncurses.h)
add_executable(ncurses ${SOURCE_FILES})
私のプロジェクトはそれが問題だろう場合、私は知らないのncursesと呼ばれている:私は、次のCMakeLists.txtを得ました。
私は、次のmain.cppに
#include <ncurses.h>
int main() {
initscr();
printw("Hello");
refresh();
getch();
endwin();
return 0;
}
を得たしかし、私は、次のエラーを取得:
/opt/clion/bin/cmake/bin/cmake --build /home/josh/ClionProjects/ncurses /cmake-build-debug --target all -- -j 4
make[2]: *** No rule to make target 'CMakeFiles/ncurses.dir/build'. Stop.
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/ncurses.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
私は問題が何であるかを得ることはありません。私はlpdcurses
を除いて-lncurses
を試しましたが、どちらもうまくいきません。 IDEA自体ではなくビルド時にエラーが発生します。あなたのCMakeLists.txt
で