[net.micro.amiga] problems with workbench.h

martin@sdcsvax.UUCP (Bruce Martin) (03/02/86)

I have problems compiling any C programs with Lattice 3.02/3.03 that
#include <workbench/workbench.h>.  (In particular the recently posted
IconExec code.)
The compiler complains:

	Error 80: invalid bit field

for the following four lines in "workbench.h".  (They are part of a struct
definition.)

    /* object flags */
    UWORD      wo_IconDisp:1;   /* icon is currently in a window */
    UWORD      wo_DrawerOpen:1;/* we're a drawer, and it is open */
    UWORD      wo_Selected:1;   /* our icon is selected */
    UWORD      wo_Background:1;/* set if icon is in background */

UWORD is defined to be unsigned short in exec/types.h.

Any ideas?  Anyone else had luck compiling IconExec?

Thanks.

fnf@unisoft.UUCP (Fred Fish) (03/03/86)

In article <1496@sdcsvax.UUCP> martin@sdcsvax.UUCP (Bruce Martin) writes:
>I have problems compiling any C programs with Lattice 3.02/3.03 that
>#include <workbench/workbench.h>.  (In particular the recently posted
>IconExec code.)

This is a known bug with some versions of 3.03, and I believe with 3.02
the same file caused a system crash.  From what I can figure out, and
I've never bothered to track down the exact differences, there are some
subtle differences in the header files for 3.03 as distributed by Lattice
and those distributed by C-A.  Try directly including the file that
defines UWORD before workbench.h and see if that cures the problem.

Always try to look at the preprocessor output before giving up...

-Fred