lua-users home
lua-l archive

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


----- Original Message ----- 
From: "Nikos K Gorogiannis" <>
To: "Multiple recipients of list" <>
Sent: Wednesday, March 28, 2001 5:15 PM
Subject: Re: help for compiling "not-tolua"

> Well, the long story: I'm working on not-tolua because I'm involved in a
> C++ computer game for which (surprise) I'm using lua as an extension
> language. My main development environment is linux (thus, gcc etc) but
> the game _has_ to be able to run on win32, hence not-tolua needs VC++
> compatibility.
> After searching intensively for an explanation for the behaviour of VC++
> (service pack 4) on that cursed line 31, and finding absolutely nothing
> useful, I thought I should rewrite not-tolua and get on with it. So,
> I've started rewriting it, replacing all template support with macros
> (shudder). I realised that it was the wrong thing to do and now I'm back
> on the design board. Ideas anyone ? :)
> Nikos

For python there are two templated library: CXX and Boost.
They are using similar tecniques as yours (IMHO).

Some code ragments from CXX examples:

// Making an extension object
class r: public Py::PythonExtension<r> {
    // override functions from PythonExtension
    virtual Py::Object repr();
    virtual Py::Object getattr( const char *name );
class R: public Py::SeqBase<Py::Int> {
    Py::Object value(const Py::Tuple& t) const {
        return static_cast<r *>(ptr())->c_value(t);

Good luck!

Best regards,
Hakki Dogusan