kerdesek
Andras Tantos
andras at tantosonline.com
Wed Aug 31 19:13:04 CEST 2005
Hali!
Biztos, hogy nem az IrLMP_Ctl-el van baja? Ha az nincs deklaralva, vagy csak
egy forward-deklaracioja van, akkor az valoban lehet 'incomplete type'.
Igaz, hogy ehhez nekem C++-ban kellett forditanom.
typedef struct IrLMP_Head {
unsigned k;
} IrLMP_Head;
struct sIrLMP_Ctl;
typedef unsigned char uint8_t;
typedef struct IrLMP_Frame {
IrLMP_Head head;
union {
sIrLMP_Ctl ctl;
uint8_t info[0];
} u;
} IrLMP_Frame;
cl.exe x.cpp
x.cpp
x.cpp(12) : error C2079: 'IrLMP_Frame::ctl' uses undefined struct
'sIrLMP_Ctl'
De az is lehet, hogy az uint8_t nincs definialva.
Udv,
Tantos Andras
> Fuzesi Arnold wrote:
>
>> Gyanitom arrol van szo hogy hordozhatora akartak megirni a kodot.
>> IrLMP_Ctl, es az uint8_t uinonja egy helyen van mint tudjuk.
>> Mivel a fenti ketto tipus platformfuggo hosszusagu lehet, ezert a tombot
>> nullanak vette, mert csak. Ugy tetszett neki. (Lehet hogy az IrLMP_Ctl is
>> lehet nulla adott esetben, es akkor ne foglaljon feleslegesen helyet)
>> De ettol lehet cimezni feljebb is a tombot.
>> Max a fordito panikol (warning csak) hogy "boundary limit" blabla.
>
> A fordito konkretan incomplete type-t mondott ra, es nem warning,
> hanem error, tehat nem fordithato.
> Azt nem ertem, hogy az uint8_t info[0] helyett miert nem
> uint8_t *info-t irtak? Ha jol sejtem, ugyanaz, de ez utobbi mukodik is.
> Persze warning hegyek vannak, mert siman atadjak castolas nelkul
> olyan fuggvenynek, ami char *-ot var... Szar az egesz.
> Kivancsi vagyok, legalabb mukodik-e.
>
>> Arnold
>
> --
> Valenta Ferenc <ferenc.valenta at vhl.hu> Volcano/Mentor Graphics
> "My love is REAL, unless declared INTEGER"
>
>
> -----------------------------------
> Szponzorunk: http://tonerbolt.hu/
>
More information about the Elektro
mailing list