Re: External structs - newbie question




Simon wrote:
I followed these instructions quite precisely, but the result was a bit
confusing. When I compile I now get a series of errors throughout
main() which say "invalid use of undefined type 'struct tiles'".

I also get an interesting error at the line in csd.c where I define map
(struct tile map[MAP_HEIGHT][MAP_WIDTH];) which says "storage size of
'map' isn't known".

There must be something obvious I'm missing...

Simon

Ignore that - by putting simply "extern tile..." in the header file and
then "tile map..." in the definition in csd.c it all seems to work
fine. Thanks a lot for your help!

Simon

.



Relevant Pages

  • -lrmi and -lvbe dont work anymore!?
    ... gtf.h:46: warning: 'struct VesaCRTCInfoBlock' declared inside parameter list ... vo_vesa.c:184: error: invalid use of undefined type 'struct ... vo_vesa.c:582: error: dereferencing pointer to incomplete type ...
    (Debian-User)
  • NeXTSTEP 3.3 + sendmail 8.13.6
    ... assert.c:78: invalid use of undefined type `struct sm_file' ... *** Exit 1 ...
    (comp.sys.next.programmer)
  • Re: Linux 2.6.22.9
    ... struct device_node *child; ... goto out; ... * Create map of hash values, offsets, and sizes, stored at end of block. ... * Compact each dir entry in the range to the minimal rec_len. ...
    (Linux-Kernel)
  • Re: Linux 2.6.23.3
    ... -static inline int heap_free ... unsigned long flags; ... struct page *pg, *next; ... struct page *map; ...
    (Linux-Kernel)
  • Re: Call by reference / references
    ... storing mapEntry structs which each struct having ... what happens if map gets very ... length*sizeof, that is, one pointer for every ... Then the MATLAB accelerator comes into play. ...
    (comp.soft-sys.matlab)