Pagina 1 di 1

[RISOLTO] [C] error: previous implicit declaration of....

Inviato: domenica 10 febbraio 2008, 14:12
da kiroken_
ciao mi affido alla vostra esperienza a cosa può essere dovuta questa serie di errori?
le "warning: initialization makes pointer from integer without a cast" credo siano dovute agli errori "error: previous implicit declaration of" però questi non capisco a cosa si riferiscano le dichiarazioni di quelle funzioni le ho fatte solo una volta negli header

Codice: Seleziona tutto

In file included from ksearch.h:3,
                 from kmeta.c:5,
                 from kmeta.h:3,
                 from stringutils.c:4,
                 from stringutils.h:3,
                 from kfile.c:5,
                 from kfile.h:3,
                 from kfs.h:3,
                 from kfilesystem.c:4:
ksearch.c: In function ‘findmetadir’:
ksearch.c:20: warning: initialization makes pointer from integer without a cast
ksearch.c:32: warning: assignment makes pointer from integer without a cast
ksearch.c: In function ‘findmetadato’:
ksearch.c:43: warning: initialization makes pointer from integer without a cast
In file included from kmeta.h:3,
                 from stringutils.c:4,
                 from stringutils.h:3,
                 from kfile.c:5,
                 from kfile.h:3,
                 from kfs.h:3,
                 from kfilesystem.c:4:
kmeta.c: In function ‘kmadd’:
kmeta.c:76: warning: initialization makes pointer from integer without a cast
kmeta.c:79: warning: initialization makes pointer from integer without a cast
kmeta.c:82: warning: initialization makes pointer from integer without a cast
kmeta.c: In function ‘kmmodifytoken’:
kmeta.c:99: warning: passing argument 1 of ‘createmetadato’ makes pointer from integer without a cast
kmeta.c:99: warning: passing argument 2 of ‘createmetadato’ makes pointer from integer without a cast
kmeta.c: In function ‘kminserttoken’:
kmeta.c:112: warning: assignment makes pointer from integer without a cast
kmeta.c: In function ‘kdbinsert’:
kmeta.c:138: warning: assignment makes pointer from integer without a cast
kmeta.c:142: warning: initialization makes pointer from integer without a cast
kmeta.c:143: warning: assignment makes pointer from integer without a cast
In file included from stringutils.h:3,
                 from kfile.c:5,
                 from kfile.h:3,
                 from kfs.h:3,
                 from kfilesystem.c:4:
stringutils.c: At top level:
stringutils.c:6: error: conflicting types for ‘extractdir’
kmeta.c:76: error: previous implicit declaration of ‘extractdir’ was here
stringutils.c:16: error: conflicting types for ‘extractfilename’
ksearch.c:43: error: previous implicit declaration of ‘extractfilename’ was here
stringutils.c:23: error: conflicting types for ‘extractsubdir’
ksearch.c:20: error: previous implicit declaration of ‘extractsubdir’ was here
stringutils.c:30: error: conflicting types for ‘extractkey’
kmeta.c:99: error: previous implicit declaration of ‘extractkey’ was here
stringutils.c:39: error: conflicting types for ‘extractvalue’
kmeta.c:99: error: previous implicit declaration of ‘extractvalue’ was here
stringutils.c:55: error: conflicting types for ‘formatmetadato’
kmeta.c:112: error: previous implicit declaration of ‘formatmetadato’ was here
stringutils.c:72: error: conflicting types for ‘generatemetaname’
kmeta.c:82: error: previous implicit declaration of ‘generatemetaname’ was here

Re: [C] error: previous implicit declaration of....

Inviato: domenica 10 febbraio 2008, 14:32
da gelina
hai controllato bene tutte le dichiarazioni, gli assegnamenti e i tipi di ritorno delle funzioni?

Re: [RISOLTO] [C] error: previous implicit declaration of....

Inviato: domenica 10 febbraio 2008, 14:42
da kiroken_
si grazie per l'interessamento ho trovato l'errore praticamente dovevo fare in modo che tutte le dichiarazioni seguissero un filo logico cosa che non era facile a causa della grande interazione tra due librerie alla fin fine ho capito che il problema era quello e sono riuscito a rimetterle un po meglio

P.S. anche se ho barato una funzione l'ho cammuffata e l'ho messa nell'altra libreria anche se a rigor di logica è piu indicata per l'altra :P