[linux] Re: error message pri kompilovani

soulfly soulfly na mail.host.sk
Pondělí Červenec 29 20:43:35 CEST 2002


On Sat, 27 Jul 2002, Marian Cavojsky wrote:

>
> Pouzite na problemove zdrojove kody prepinac -M aby gcc oznamilo, ake
> hlavickove subory vklada. Ak medzi nimi nebude limits.h z tej adresy,
> bude to jasne.
>

takze som zistil ze pri kompilovani LINKS 2.0 berie limits.h z
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h

..zaujimalo by ma preco prave limits.h berie odtial a nie z /usr/include
tak ako ostatne hlavickove subory.

Tak som do toho /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h
pridal
#define INT_MIN       (-INT_MAX - 1)
#define INT_MAX       2147483647

a vsetko vyzeralo ok
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/local/include
-I/usr/X11R6/include  -g -O2 -c af_unix.c
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/local/include
-I/usr/X11R6/include  -g -O2 -c beos.c
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/local/include
-I/usr/X11R6/include  -g -O2 -c bfu.c
gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/local/include
-I/usr/X11R6/include  -g -O2 -c bookmarks.c
...
...

ale potom sa vyskytla dalsia chyba

gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/local/include
-I/usr/X11R6/include  -g -O2 -c file.c
file.c: In function `file_func':
file.c:200: `DIR' undeclared (first use in this function)
file.c:200: (Each undeclared identifier is reported only once
file.c:200: for each function it appears in.)
file.c:200: `d' undeclared (first use in this function)
file.c:201: parse error before `int'
file.c:211: `h' undeclared (first use in this function)
file.c:218: `stt' undeclared (first use in this function)
file.c:256: warning: assignment makes pointer from integer without a cast
file.c:262: dereferencing pointer to incomplete type
file.c:262: dereferencing pointer to incomplete type
file.c:266: dereferencing pointer to incomplete type
file.c:270: dereferencing pointer to incomplete type
file.c:354: `r' undeclared (first use in this function)
make: *** [file.o] Error 1


...hm v Cecku nekodim taze nechapem co to ma byt.

file.c :
195     void file_func(struct connection *c)
196     {
197             struct cache_entry *e;
198             unsigned char *file, *name, *head;
199             int fl;
200             DIR *d;
201             int h, r;
202             struct stat stt;
203             if (anonymous) {
204                     setcstate(c, S_BAD_URL);
205                     abort_connection(c);
206                     return;
207             }

211             if ((h = open(name, O_RDONLY | O_NOCTTY)) == -1) {
218             if (fstat(h, &stt)) {
256             while ((de = readdir(d))) {
262             if (!strcmp(de->d_name, ".")) continue;
266             dir[dirl].f = stracpy(de->d_name);
270             add_to_strn(&n, de->d_name);
354             if ((r = read(h, file, stt.st_size)) != stt.st_size) {


Dufam ze v tom niekto zbada nejaku suvislost ;)
...dik






Další informace o konferenci linux