I have the required ncurses and net-snmp packages installed but am unable to compile on an up-to-date Arch Linux x86_64.
% make clean
rm -f .o
rm -f cmdiag
rm -f .*~
% make
g++ -Wall -O2 -c cmdiag.cpp
cmdiag.cpp: In function ‘int main(int, char)’:
cmdiag.cpp:28:48: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
char * cm_ip = get_cmd_option(argc, argv, CMIP);
^
cmdiag.cpp:29:54: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
char * cm_str = get_cmd_option(argc, argv, CM_STRING);
^
cmdiag.cpp:30:52: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
char * cmts_ip = get_cmd_option(argc, argv, CMTSIP);
^
cmdiag.cpp:31:58: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
char * cmts_str = get_cmd_option(argc, argv, CMTS_STRING);
^
cmdiag.cpp:45:46: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
cmodem = new CModem(cm_ip, " ", cm_str, " ");
^
cmdiag.cpp:45:46: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
In file included from cmdiag.cpp:12:0:
cmdiag.cpp:211:61: error: ‘strstr’ was not declared in this scope
mvwaddstr(stdscr, 42, 12, strstr(sys_info->c_str(), "<<"));
^
make: *** [cmdiag.o] Error 1
Just add the following line #include <string.h> in the beginning of
the file cmdiag.cpp. Others are just warnings.</string.h>
On 7/16/13, graysky graysky2@users.sf.net wrote:
Related
Bugs: #3