[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: tolua compiling error with c++ and vc60
- From: "Nick Trout" <ntrout@...>
- Date: Tue, 7 Jan 2003 11:08:24 -0800
> From: owner-lua-l@tecgraf.puc-rio.br
> [mailto:owner-lua-l@tecgraf.puc-rio.br] On Behalf Of Cameron Tofer
> Sent: January 3, 2003 8:04 PM
> To: Multiple recipients of list
> Subject: tolua compiling error with c++ and vc60
>
>
> hi,
>
> i'm using toLua to generate a .cpp file. i'm getting
> compiling errors
> when i have enums in the .pkg. For example:
>
> error C2440: 'type cast' : cannot convert from 'float' to 'enum'
>
> i suppose c++ cares so much because of strict type checking
> although gcc
> doesn't seem to care.
>
> i've thought of all sorts of horrible ways to get around it.
> does anyone
> have a simple solution to this?
>
> thanks,
> cam
Sorry, I cant think whats causing your problem off the top of my head
(too much turkey). I use a lot of enums and tolua in
http://doris.sf.net/ Perhaps you could see if this compiles cleanly and
helps you.
It depends which compiler you use, you get some errors for bools as
well. Some compilers complain that casting an int to a bool is bad (ie.
you should use int!=0). I think I modified the Doris tolua version to
fix these warnings.
HNY
Nick.