Компилиране на cmdiag

Това е инструмент за диагностика на DOCSIS кабелни модеми.
Изтегля информацията от модема в реално време и показва ключови параметри по отношение на мрежата. Инструмента е писан на С++ и работи на Linux и FreeBSD.

Сваляне: http://sourceforge.net/projects/cmdiag/
Официална страница: http://sourceforge.net/projects/cmdiag/
Картинки: http://sourceforge.net/project/screenshots.php?group_id=212972

Лиценз: GPL

Имах проблеми при компилирането на cmdiag версия 0.2

При изпълнение на make получавах следната грешка:

traffic:/tmp/cmdiag-0.2# make
g++ -Wall -O2  -c cmdiag.cpp
cmdiag.cpp:12:21: error: ncurses.h: Няма такъв файл или директория
cmdiag.cpp: In function 'int main(int, char**)':
cmdiag.cpp:28: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:29: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:30: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:31: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:33: error: 'initscr' was not declared in this scope
cmdiag.cpp:34: error: 'cbreak' was not declared in this scope
cmdiag.cpp:35: error: 'noecho' was not declared in this scope
cmdiag.cpp:36: error: 'stdscr' was not declared in this scope
cmdiag.cpp:36: error: 'TRUE' was not declared in this scope
cmdiag.cpp:36: error: 'keypad' was not declared in this scope
cmdiag.cpp:37: error: 'start_color' was not declared in this scope
cmdiag.cpp:38: error: 'curs_set' was not declared in this scope
cmdiag.cpp:40: error: 'A_BOLD' was not declared in this scope
cmdiag.cpp:40: error: 'attron' was not declared in this scope
cmdiag.cpp:41: error: 'mvwaddstr' was not declared in this scope
cmdiag.cpp:42: error: 'attroff' was not declared in this scope
cmdiag.cpp:45: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:45: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:115: error: 'refresh' was not declared in this scope
cmdiag.cpp:210: error: 'mvaddnstr' was not declared in this scope
cmdiag.cpp:211: error: 'strstr' was not declared in this scope
cmdiag.cpp:272: error: 'endwin' was not declared in this scope
make: *** [cmdiag.o] Error 1

Проблемът е, че няма ncurses-dev за целта го инсталиране: apt-get install libncurses5-dev и изпълняваме отново "make clean && make"

Отново получаваме грешна, но от друг характер, а именно:

traffic:/tmp/cmdiag-0.2# make clean && make
rm -f *.o
rm -f cmdiag
rm -f *.*~
g++ -Wall -O2  -c cmdiag.cpp
cmdiag.cpp: In function 'int main(int, char**)':
cmdiag.cpp:28: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:29: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:30: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:31: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:45: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:45: warning: deprecated conversion from string constant to 'char*'
cmdiag.cpp:211: error: 'strstr' was not declared in this scope
make: *** [cmdiag.o] Error 1

Тази грешка е причинена от това, че във файл cmdiag.cpp липсва хедъра string.h за целта добавяме в cmdiag.cpp  :

#include <string.h>

След това изпълняваме отново  "make clean && make" и всичко се компилира точно и вече имаме cmdiag

Ето снимка на cmdiag:

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Вашият коментар

Вашият email адрес няма да бъде публикуван Задължителните полета са отбелязани с *