[ntp:questions] tg2.c - can't compile

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Sat Aug 16 07:42:40 UTC 2014


On 2014-08-15 23:50, Mark C. Stephens wrote:
> -----Original Message-----
> From: questions-bounces+marks=non-stop.com.au at lists.ntp.org [mailto:questions-bounces+marks=non-stop.com.au at lists.ntp.org] On Behalf Of Brian Inglis
> Sent: Saturday, 16 August 2014 12:07 PM
> To: questions at lists.ntp.org
> Subject: Re: [ntp:questions] tg2.c - can't compile
>
> On 2014-08-15 12:57, Mark C. Stephens wrote:
>> Irig time code server has died and I wanted to implement a tempory measure using the timecode generator in the source directory.
>>
>> When I try to compile I get:
>>
>> [root at ntp-1 util]# gcc tg2.c
>> tg2.c:217:24: error: sys/audio.h: No such file or directory
>> tg2.c:221:55: error: ntp_stdlib.h: No such file or directory
>> tg2.c:522: error: 'FALSE' undeclared here (not in a function)
>> tg2.c:527: error: 'TRUE' undeclared here (not in a function)
>> tg2.c:531: error: 'AUDIO_MAX_GAIN' undeclared here (not in a function)
>> tg2.c:532: error: 'AUDIO_LINE_OUT' undeclared here (not in a function)
>> tg2.c: In function 'main':
>> tg2.c:550: error: 'audio_info_t' undeclared (first use in this function)
>> tg2.c:550: error: (Each undeclared identifier is reported only once
>> tg2.c:550: error: for each function it appears in.)
>> tg2.c:550: error: expected ';' before 'info'
>> tg2.c:1033: error: 'AUDIO_GETINFO' undeclared (first use in this function)
>> tg2.c:1033: error: 'info' undeclared (first use in this function)
>> tg2.c:1043: error: 'AUDIO_ENCODING_ULAW' undeclared (first use in this function)
>> tg2.c:1048: error: 'AUDIO_SETINFO' undeclared (first use in this function)
>> [root at ntp-1 util]# gcc tg.c
>> tg.c:55:23: error: sys/audio.h: No such file or directory
>> tg.c:240: error: 'AUDIO_MAX_GAIN' undeclared here (not in a function)
>> tg.c:241: error: 'AUDIO_LINE_OUT' undeclared here (not in a function)
>> tg.c: In function 'main':
>> tg.c:258: error: 'audio_info_t' undeclared (first use in this function)
>> tg.c:258: error: (Each undeclared identifier is reported only once
>> tg.c:258: error: for each function it appears in.)
>> tg.c:258: error: expected ';' before 'info'
>> tg.c:295: error: 'AUDIO_SPEAKER' undeclared (first use in this function)
>> tg.c:330: error: 'AUDIO_GETINFO' undeclared (first use in this function)
>> tg.c:330: error: 'info' undeclared (first use in this function)
>> tg.c:340: error: 'AUDIO_ENCODING_ULAW' undeclared (first use in this function)
>> tg.c:345: error: 'AUDIO_SETINFO' undeclared (first use in this function)
>>
>>
>> this is /ntp-4.2.6p5/
>>
>> some help please?
>
> If you haven't done this before or have fogotten:
> cd .../ntp-4.2.6p5/
> ./configure
> make
> make install
> if you have, skip the configure,
> unless you have updated your autotools since last build.

> Hi Ben, it seems make doesn't build tg.c / tg2.c

Copy one of the gcc compile lines from the screen, log, or makefile, and try that.
Add tg.o and tg2.o to the objects symbol am_libntpd_a_OBJECTS = in the ntpd directory
Makefile, put your sources there, and retry make.

-- 
Take care. Thanks, Brian Inglis


More information about the questions mailing list