size_t - kde ho najdu

Michal Schmidt xschmi00 na stud.feec.vutbr.cz
Úterý Listopad 21 11:20:00 CET 2006


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 :-(
> 
>                     Michal Ježek
> 
> 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"
> util.c:44: warning: return type defaults to `int'

Vy používáte strncpy bez #include <string.h> ?
On už by si měl pak includnout stddef.h, ze kterého dostane size_t.

> 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)
> util.c:48: error: (Each undeclared identifier is reported only once
> util.c:48: error: for each function it appears in.)
> util.c:48: error: syntax error before "ret"
> util.c:50: error: `ret' undeclared (first use in this function)
> make: *** [util.o] Error 1



Další informace o konferenci Linux