Added the -lncurses option to the c++ compiler options. When building the following error is issued:

cd '/ home / ilia / NetBeansProjects / Console' / usr / bin / make -f Makefile CONF = Debug "/ usr / bin / make" -f nbproject / Makefile-Debug.mk QMAKE = SUBPROJECTS = .build-conf make [ 1]: Enter the directory /home/ilia/NetBeansProjects/Console' "/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux/console make[2]: Вход в каталог / /home/ilia/NetBeansProjects/Console' "/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux/console make[2]: Вход в каталог home / ilia / NetBeansProjects / Console 'mkdir -p build / Debug / GNU-Linux rm -f "build / Debug / GNU-Linux / main.od" g ++ -lncurses -c -g -std = c ++ 14 -MMD -MP -MF "build / Debug / GNU-Linux / main.od" -o build / Debug / GNU-Linux / main.o main.cpp g ++: error: unrecognized command line option '-std = c ++ 14' make [2]: * [build / Debug / GNU-Linux / main.o] Error 1 make [2]: Exit the directory /home/ilia/NetBeansProjects/Console' make[1]: *** [.build-conf] Ошибка 2 make[1]: Выход из каталога / home / ilia / NetBeansProjects / Console 'make: * [.build-impl] Error 2

COLLECT FAILED (exit value 2 ,, total time: 58ms)

  • gcc --version what does it say? - PinkTux
  • @pink gcc (Ubuntu 4.8.4-2ubuntu1 ~ 14.04.3) 4.8.4 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - Herrgott
  • g++ that is, not gcc. - PinkTux
  • yes, here is g++ --version exhaust g++ --version g ++ (Ubuntu 4.8.4-2ubuntu1 ~ 14.04.3) 4.8.4 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - Herrgott
  • Separately via g++ *.cpp -o prog -lncurses fine - Herrgott

3 answers 3

G++-4.8.x does not support C ++ 14
You need to choose another C++
To do this, go to the menu Файл-Свойства-Компилятор С++
In the term of C++ Standard choose C++11 or C++98

  • The same balalaika - Herrgott
  • Errors are now only like /home/ilia/NetBeansProjects/Console/main.cpp:9: undefined reference to unlicensed initscr '/home/ilia/NetBeansProjects/Console/main.cpp:11: undefined stdscr' /home/ilia/NetBeansProjects/Console/main.cpp:11: undefined reference to wap" / home / ilia / NetBeansProjects/Console/main.cpp: 11: undefined reference to stdscr' - Herrgott

C ++ support with 14 different versions of g ++ . As follows from the C ++ 14 Language Features table, the relatively full support for this standard begins with versions 4.9, and the fully-fledged one starts with versions 5.x (although by default the -std=c++14 mode is included in version 6.1 as well).

    Solved. I added -lncurses to the compiler options, but to the linker options. Thanks to all that prompted to change the standard. At 11 everything worked!