Make zttool ~problem

when i make zttool,here is a problem.who can tell me why?

[color=red]cc -I. -O4 -g -Wall -DBUILDING_TONEZONE -m64 -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG="/etc/zaptel.conf" -c -o zttool.o zttool.c
zttool.c:40:18: newt.h: No such file or directory
zttool.c:135: error: syntax error before "spans"
zttool.c: In function add_cards': zttool.c:141: error:spans’ undeclared (first use in this function)
zttool.c:141: error: (Each undeclared identifier is reported only once
zttool.c:141: error: for each function it appears in.)
zttool.c:142: warning: implicit declaration of function newtListboxGetCurrent' zttool.c:142: warning: assignment makes pointer from integer without a cast zttool.c:143: warning: implicit declaration of functionnewtListboxClear’
zttool.c:148: warning: implicit declaration of function newtListboxAppendEntry' zttool.c:152: warning: implicit declaration of functionnewtListboxSetCurrentByKey’
zttool.c: At top level:
zttool.c:156: error: syntax error before "c"
zttool.c: In function sel_callback': zttool.c:161: error:cbdata’ undeclared (first use in this function)
zttool.c:161: error: c' undeclared (first use in this function) zttool.c:171: warning: implicit declaration of functionnewtPopHelpLine’
zttool.c:172: warning: implicit declaration of function newtPushHelpLine' zttool.c: At top level: zttool.c:175: error: syntax error before "newtComponent" zttool.c: In functionshow_bits’:
zttool.c:202: error: span' undeclared (first use in this function) zttool.c:271: warning: implicit declaration of functionnewtTextboxSetText’
zttool.c:271: error: bitbox' undeclared (first use in this function) zttool.c:273: error:inuse’ undeclared (first use in this function)
zttool.c:277: error: levels' undeclared (first use in this function) zttool.c:279: error:bpvcount’ undeclared (first use in this function)
zttool.c:281: error: irqmisses' undeclared (first use in this function) zttool.c:282: error:alarms’ undeclared (first use in this function)
zttool.c:287: error: syncsrc' undeclared (first use in this function) zttool.c: In functiondo_loop’:
zttool.c:294: error: newtComponent' undeclared (first use in this function) zttool.c:294: error: syntax error before "form" zttool.c:299: error: storage size of 'es' isn't known zttool.c:301: warning: implicit declaration of functionnewtOpenWindow’
zttool.c:303: error: form' undeclared (first use in this function) zttool.c:303: warning: implicit declaration of functionnewtForm’
zttool.c:313: error: label' undeclared (first use in this function) zttool.c:313: warning: implicit declaration of functionnewtLabel’
zttool.c:314: warning: implicit declaration of function newtFormAddComponent' zttool.c:317: warning: implicit declaration of functionnewtFormSetTimer’
zttool.c:318: warning: implicit declaration of function newtFormRun' zttool.c:320: warning: implicit declaration of functionnewtFormDestroy’
zttool.c:321: warning: implicit declaration of function newtPopWindow' zttool.c:299: warning: unused variablees’
zttool.c: At top level:
zttool.c:325: error: syntax error before "spans"
zttool.c:325: warning: type defaults to int' in declaration ofspans’
zttool.c:325: warning: data definition has no type or storage class
zttool.c: In function show_span': zttool.c:328: error:newtComponent’ undeclared (first use in this function)
zttool.c:328: error: syntax error before "form"
zttool.c:344: error: storage size of ‘es’ isn’t known
zttool.c:351: warning: assignment makes pointer from integer without a cast
zttool.c:361: error: back' undeclared (first use in this function) zttool.c:361: warning: implicit declaration of functionnewtButton’
zttool.c:362: error: loop' undeclared (first use in this function) zttool.c:363: error:form’ undeclared (first use in this function)
zttool.c:365: warning: implicit declaration of function newtFormAddComponents' zttool.c:374: error:bitbox’ undeclared (first use in this function)
zttool.c:374: warning: implicit declaration of function newtTextbox' zttool.c:377: error:label’ undeclared (first use in this function)
zttool.c:383: warning: implicit declaration of function newtFormAddHotKey' zttool.c:383: error:NEWT_KEY_F10’ undeclared (first use in this function)
zttool.c:414: error: inuse' undeclared (first use in this function) zttool.c:420: error:levels’ undeclared (first use in this function)
zttool.c:426: error: bpvcount' undeclared (first use in this function) zttool.c:432: error:irqmisses’ undeclared (first use in this function)
zttool.c:438: error: syncsrc' undeclared (first use in this function) zttool.c:444: error:alarms’ undeclared (first use in this function)
zttool.c:453: error: NEWT_EXIT_TIMER' undeclared (first use in this function) zttool.c:455: error:NEWT_EXIT_COMPONENT’ undeclared (first use in this function)
zttool.c:465: error: NEWT_EXIT_HOTKEY' undeclared (first use in this function) zttool.c:344: warning: unused variablees’
zttool.c: In function show_spans': zttool.c:489: error:newtComponent’ undeclared (first use in this function)
zttool.c:489: error: syntax error before "form"
zttool.c:495: error: storage size of ‘es’ isn’t known
zttool.c:498: error: quit' undeclared (first use in this function) zttool.c:499: error:sel’ undeclared (first use in this function)
zttool.c:501: warning: implicit declaration of function newtListbox' zttool.c:501: error:NEWT_FLAG_SCROLL’ undeclared (first use in this function)
zttool.c:502: warning: implicit declaration of function newtListboxSetWidth' zttool.c:504: error:label’ undeclared (first use in this function)
zttool.c:506: warning: implicit declaration of function newtCenteredWindow' zttool.c:507: error:form’ undeclared (first use in this function)
zttool.c:513: warning: implicit declaration of function newtComponentAddCallback' zttool.c:515: error:NEWT_KEY_F1’ undeclared (first use in this function)
zttool.c:516: error: NEWT_KEY_F10' undeclared (first use in this function) zttool.c:523: error:NEWT_EXIT_TIMER’ undeclared (first use in this function)
zttool.c:526: error: NEWT_EXIT_COMPONENT' undeclared (first use in this function) zttool.c:535: error:NEWT_EXIT_HOTKEY’ undeclared (first use in this function)
zttool.c:495: warning: unused variable es' zttool.c: In functionmain’:
zttool.c:564: warning: implicit declaration of function newtInit' zttool.c:565: warning: implicit declaration of functionnewtCls’
zttool.c:567: warning: implicit declaration of function newtDrawRootText' zttool.c:571: warning: implicit declaration of functionnewtFinished’
make: *** [zttool.o] Error 1
[/color]

I guess a header file is missing…
(newt.h)

zttool.c:40:18: newt.h: No such file or directory

freedomphones.net/files/newt-0.51.6.tar.gz

you may have to make a symbolic link for the lib it creates depending on your system, but this is the newt I use on our systems for zttool

The line:

zttool.c:40:18: newt.h: No such file or directory

indicates you need to install the libnewt-dev package.

If you are building from source, after installing libnewt-dev you need to run:

make dist-clean
./configure
make

Without the ‘dist-clean’ and ‘configure’, trying to ‘make zttool’ would just break with further errors:

gcc -g -c -I. -O4 -g -Wall -DBUILDING_TONEZONE -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG="/etc/zaptel.conf" -DHOTPLUG_FIRMWARE -o zttool.o zttool.c
gcc zttool.o -o zttool
zttool.o: In function add_cards':/usr/src/svn/zaptel/zttool.c:142: undefined reference tonewtListboxGetCurrent’
:/usr/src/svn/zaptel/zttool.c:143: undefined reference to newtListboxClear' :/usr/src/svn/zaptel/zttool.c:148: undefined reference tonewtListboxAppendEntry’
:/usr/src/svn/zaptel/zttool.c:152: undefined reference to newtListboxSetCurrentByKey' zttool.o: In functionsel_callback’:/usr/src/svn/zaptel/zttool.c:161: undefined reference to newtListboxGetCurrent' :/usr/src/svn/zaptel/zttool.c:171: undefined reference tonewtPopHelpLine’
:/usr/src/svn/zaptel/zttool.c:172: undefined reference to newtPushHelpLine' :/usr/src/svn/zaptel/zttool.c:171: undefined reference tonewtPopHelpLine’