size_t - kde ho najdu

Jan Otte jan.otte na logicacmg.com
Úterý Listopad 21 09:39:07 CET 2006


On Mon, Nov 20, 2006 at 07:49:48AM +0100, Michal Jezek wrote:
> Dobrý den.
>      Mám problémek při kompilaci milter-rcptfilter. ./configure proběhne v pořádku (žádný eror tam není), make ale nahlásí níže uvedené "sprosťárny". Kde najdu funkce size_t a ret? V jaké knihovně nebo balíku se ty mršky skovávají. Nějak je nemůžu vypátrat :-(
> 

milter-rcptfilter neznam, ale chyba z kompilatoru je jednoznacna:

> make
> gcc -g -O2 -Wall -D_XOPEN_SOURCE=500    -D_BSD_SOURCE   -c -o util.o util.c
> util.c:43: error: syntax error before "strncpy"

na radku 43 (util.c) nebo predchozim (napr. na predchozim chybi strednik) je
syntakticka chyba. Veskere dalsi reportovane chyby mohou byt jen
dusledkem teto syntakticke chyby, nejprve musis opravit ji.

Samozrejme muze byt dusledkem toho, ze ti neco chybi, ale vzhledem k
tomu, ze kompilator nenapsal ani tuk o nejakem nerozpoznanem lexikalnim
elementu, bude to pravdepodobne chybejici strednik na predchozim radku
nebo nejaka podobna drobnost.

> util.c:44: warning: return type defaults to `int'
> util.c: In function `strncpy':
> util.c:46: error: syntax error before "size_t"
> util.c:48: error: `size_t' undeclared (first use in this function)

size_t je typ, definovan ve stddef.h, staci include stdlib.h, ten se o
to postara, pokud to ale neni dusledek drivejsi syntakticke chyby

> util.c:48: error: (Each undeclared identifier is reported only once
> util.c:48: error: for each function it appears in.)

Dal bych se uz nedival, prvne oprav vyse reportovane chyby.

> util.c:48: error: syntax error before "ret"
> util.c:50: error: `ret' undeclared (first use in this function)
> make: *** [util.o] Error 1

Honza


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


Další informace o konferenci Linux