lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Okay, I have a revision to make on my question. It wasn't just that one file. Using the infallible process of elimination, it appears that any pkg file with a struct, class, or typedef (possibly other things as well) in it will cause toLua++ to throw. The only files that it will parse without errors are simple enum and static function definition files.

On Nov 11, 2008, at 12:39 AM, Etherous wrote:

I'm trying parse some .pkg files with toLua++, but I'm getting an error on one of the files. I can't figure out what the problem is. I'm assuming toLua++ just can't parse something in it, because the original header file is perfect. I think I put all the relevant .pkg code bellow, followed by the error message:

struct IDirect3D9;
struct IDirect3DDevice9;
struct IDirect3D8;
struct IDirect3DDevice8;

namespace irr
{
namespace video
{
struct SExposedVideoData
{
    union
    {
        struct
        {
            IDirect3D9* D3D9;
            IDirect3DDevice9* D3DDev9;
            s32 HWnd;
        } D3D9;
        struct
        {
            IDirect3D8* D3D8;
            IDirect3DDevice8* D3DDev8;
            s32 HWnd;
        } D3D8;
        struct 
        {
            s32 HDc; 
            s32 HRc; 
            s32 HWnd;
        } OpenGLWin32;
        struct
        {
            void* X11Display;
            unsigned long X11Window;
        } OpenGLLinux;
    };
};

} // end namespace video
} // end namespace irr


-- Error Output --

stack traceback:
[string "tolua embedded: src/bin/lua/basic.lua"]:91: in function 'tolua_error'
[string "tolua: embedded Lua code 22"]:5: in main chunk

** tolua internal error: [string "tolua embedded: src/bin/lua/container.lua"]:737: #parse error.


stack traceback:
[string "tolua: embedded Lua code 22"]:6: in main chunk

PS: You might notice that this is Irrlicht code, and you may want to suggest I use IrrLua. Don't