[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: tolua++ works with 5.1 (a few problems, mac osx)
- From: Rob Shaw <rob@...>
- Date: Wed, 22 Mar 2006 13:28:36 +0100
I found a motivation to move from 5.0.2 and tolua, to 5.1 and tolua++,
namely lua 5.1 runs a good 25% faster, in tight computation loops.
Also the readline stuff is available in 5.1 under mac osx 10.4.5.
However I spent a frustrating afternoon making the move, maybe
this description will save someone some time.
My main problem was that the "tolua++ Reference Manual"
says that the initialization function is defined as
This works fine with tolua, but apparently tolua++ needs
The program would compile just fine, but would bomb with
a bus error when the initialization function was called, I didn't
see what was happening until I compiled everything with gdb.
Other minor gripes, the test programs in /src/test don't compile
because lua_dofile() has vanished. Also, the .pkg extension
is used in mac osx for software update packages, so the
"finder" gets confused, I just use another extension.
Scons didn't immediately work for me, so I modified the
makefiles from tolua. Makefiles are clunky, but have been
around for 30 years. (will scons be around in 30 years?)
(will the world be around in 30 years?)
a few typos in the well-written manual:
"in wich case" <- "in which case"
"sonce" <- "since"
"is insert into" <- "is inserted into"
"what can degrade" <- "which can degrade"
"retain it's inheritance" <- "retain its inheritance"
"casted " <- "cast"
"unsuported" <- "unsupported"
"acomplishes" <- "accomplishes"
Also a question, if the byte codes have changed between
5.0.2 and 5.1, how can tolua work for both? It sure looks
like toluabind.c is chock full of byte codes. Just curious.
Thanks, everything works (I hope),