Conspy:尝试编译最新版本时出现“未定义的引用”错误

Conspy:尝试编译最新版本时出现“未定义的引用”错误

康斯比是 Linux 中 TTY 虚拟控制台的简洁远程控制程序。

我在尝试着编译最新的 v1.10-1版本,但在安装了所有所谓需要的软件包后,我仍然有一个编译错误停止该过程:

luis@utilite-desktop:~/Temporal/conspy/conspy-1.10$ make clean
test -z "conspy" || rm -f conspy
test -z "*~" || rm -f *~
rm -f *.o
luis@utilite-desktop:~/Temporal/conspy/conspy-1.10$ make
gcc -DPACKAGE_NAME=\"conspy.c\" -DPACKAGE_TARNAME=\"conspy-c\" -DPACKAGE_VERSION=\"1.10\" -DPACKAGE_STRING=\"conspy.c\ 1.10\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"conspy-c\" -DVERSION=\"1.10\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_GETOPT_H=1 -DHAVE_STDARG_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_SELECT=1 -DHAVE_STRTOL=1 -I.     -g -O2 -MT conspy.o -MD -MP -MF .deps/conspy.Tpo -c -o conspy.o conspy.c
conspy.c: In function 'process_command_line':
conspy.c:352:11: warning: ignoring return value of 'strtol', declared with attribute warn_unused_result [-Wunused-result]
mv -f .deps/conspy.Tpo .deps/conspy.Po
gcc  -g -O2   -o conspy conspy.o
conspy.o: In function `cleanup':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:542: undefined reference to `endwin'
conspy.o: In function `conspy':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:624: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:625: undefined reference to `wclrtoeol'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:658: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:659: undefined reference to `waddchnstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:660: undefined reference to `wchgat'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:680: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:681: undefined reference to `waddchnstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:682: undefined reference to `wchgat'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:685: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:686: undefined reference to `wrefresh'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:615: undefined reference to `LINES'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:615: undefined reference to `LINES'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:699: undefined reference to `endwin'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:700: undefined reference to `wrefresh'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `LINES'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `COLS'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `curscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:729: undefined reference to `wrefresh'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:617: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:617: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:618: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:618: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:617: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:618: undefined reference to `wclrtobot'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:779: undefined reference to `stdscr'
conspy.o: In function `setup':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:499: undefined reference to `initscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:500: undefined reference to `nonl'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:515: undefined reference to `has_colors'
conspy.o: In function `main':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:278: undefined reference to `tigetstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:280: undefined reference to `tigetstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:280: undefined reference to `putp'
conspy.o: In function `setup':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:517: undefined reference to `start_color'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:529: undefined reference to `init_pair'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:519: undefined reference to `acs_map'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:519: undefined reference to `COLOR_PAIRS'
collect2: ld returned 1 exit status
make: *** [conspy] Error 1

编译产生类似的错误在:

  • PC(ASUS 便携式计算机)上的 Ubuntu 14.04 LTS。
  • Compulab 的 Utilite 上的 Ubuntu 12.04 LTS(嵌入式设备,如 RaspBerry)。

为什么建筑物是否因该undefined reference错误而发生故障?它是如何发生的?解决了

答案1

对于那些到达这里的人来说,这些是需要的包对于ConSpy:

# apt-get install libtool libncurses5-dev fakeroot sudo automake devscripts

问题(或者我相信):正如@SteelDriver 指出的那样,在每次make尝试之间我没有做所需的./configure.

2015 年 10 月 16 日更新:

  • /configure自 v1.13 及更高版本以来无需执行此操作。事实上,来源上已经不再有这样的脚本了。它似乎包含在编译脚本中。

相关内容