Почему проклятия на Linux дающий мне после ошибки?

Кнопка. ClickEvent является нестатическим внутренним классом, таким образом, экземпляр этого класса может только существовать включенный в экземпляр Кнопки.

В Вашем втором примере кода у Вас есть экземпляр Кнопки, и Вы создаете экземпляр ClickEvent, включенного в этот экземпляр Кнопки...

10
задан John Carter 3 October 2009 в 11:18
поделиться

1 ответ

That's a linking error. Are you linking to the curses library correctly?

There are two steps involved in using a library in C.

  1. You #include the relevant header files from your source files. This is so your code knows what signatures of the library functions are. So you're doing this correctly.
  2. When compiling your code, you need to tell the linker to link to the relevant libraries, so it can find the definition of those functions. This is what you're not doing. Assuming you're using gcc then adding -lncurses to the compile line should do it. Here's an explanation of linking.
16
ответ дан 3 December 2019 в 22:00
поделиться
Другие вопросы по тегам:

Похожие вопросы: