Luabind compilation errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Luabind compilation errors

Bradley Arsenault
I'm trying to compile luabind for use in my application. I
unsuccessfully attempted a compilation of a static lib, so instead, I
tried inputting the source into my program, with the same failure. The
compilation output and errors are below:

[bradley@localhost src]$ make
 cd .. && /bin/sh /home/bradley/glob2/missing --run automake-1.9 --gnu
 src/Makefile
src/Makefile.am:224: LIBS was already defined in condition TRUE, which
includes condition LINKSTATIC ...
configure.in:2: ... `LIBS' previously defined here
 cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
config.status: executing depfiles commands
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/SDL -D_REENTRANT
-I./../libgag/include  -I/usr/include/SDL -D_REENTRANT  -O3 -g -pg
-Wall -g -I/usr/include/SDL -D_REENTRANT -MT wrapper_base.o -MD -MP
-MF ".deps/wrapper_base.Tpo" -c -o wrapper_base.o `test -f
'luabind/src/wrapper_base.cpp' || echo
'./'`luabind/src/wrapper_base.cpp; \
then mv -f ".deps/wrapper_base.Tpo" ".deps/wrapper_base.Po"; else rm
-f ".deps/wrapper_base.Tpo"; exit 1; fi
./luabind/detail/ref.hpp: In constructor
'luabind::detail::lua_reference::lua_reference(lua_State*)':
./luabind/detail/ref.hpp:50: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In copy constructor
'luabind::detail::lua_reference::lua_reference(const
luabind::detail::lua_reference&)':
./luabind/detail/ref.hpp:54: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In member function 'bool
luabind::detail::lua_reference::is_valid() const':
./luabind/detail/ref.hpp:74: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In member function 'void
luabind::detail::lua_reference::get(lua_State*) const':
./luabind/detail/ref.hpp:94: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In member function 'void
luabind::detail::lua_reference::reset()':
./luabind/detail/ref.hpp:101: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp:102: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In constructor 'luabind::handle::handle()':
./luabind/handle.hpp:58: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In copy constructor
'luabind::handle::handle(const luabind::handle&)':
./luabind/handle.hpp:63: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In constructor 'luabind::handle::handle(lua_State*, int)':
./luabind/handle.hpp:72: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In destructor 'luabind::handle::~handle()':
./luabind/handle.hpp:80: error: 'LUA_NOREF' was not declared in this scope
make: *** [wrapper_base.o] Error 1

I'm not sure how to fix these, help would be appreciatted.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Luabind compilation errors

Arvid Norberg-2
On Tue, Jul 11, 2006 at 07:18:52PM -0700, Bradley Arsenault wrote:
> I'm trying to compile luabind for use in my application. I
> unsuccessfully attempted a compilation of a static lib, so instead, I
> tried inputting the source into my program, with the same failure. The
> compilation output and errors are below:

It looks like you're using lua 5.1, for 5.1 compatibility you currently have to use the cvs version of luabind.

--
Arvid Norberg


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Luabind compilation errors

Mandeep Rai
In reply to this post by Bradley Arsenault
i am unsure of the rest... but the LUA_NOREF for me was fixed by using an older version of lua (5.0.2?) to compile with, instead of the newest version

-mandeep

On 7/11/06, Bradley Arsenault <[hidden email]> wrote:
I'm trying to compile luabind for use in my application. I
unsuccessfully attempted a compilation of a static lib, so instead, I
tried inputting the source into my program, with the same failure. The
compilation output and errors are below:

[bradley@localhost src]$ make
cd .. && /bin/sh /home/bradley/glob2/missing --run automake-1.9 --gnu
src/Makefile
src/Makefile.am:224: LIBS was already defined in condition TRUE, which
includes condition LINKSTATIC ...
configure.in:2: ... `LIBS' previously defined here
cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
config.status: executing depfiles commands
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/SDL -D_REENTRANT
-I./../libgag/include  -I/usr/include/SDL -D_REENTRANT  -O3 -g -pg
-Wall -g -I/usr/include/SDL -D_REENTRANT -MT wrapper_base.o -MD -MP
-MF ".deps/wrapper_base.Tpo" -c -o wrapper_base.o `test -f
'luabind/src/wrapper_base.cpp' || echo
'./'`luabind/src/wrapper_base.cpp; \
then mv -f ".deps/wrapper_base.Tpo" ".deps/wrapper_base.Po"; else rm
-f ".deps/wrapper_base.Tpo"; exit 1; fi
./luabind/detail/ref.hpp: In constructor
'luabind::detail::lua_reference::lua_reference(lua_State*)':
./luabind/detail/ref.hpp:50: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In copy constructor
'luabind::detail::lua_reference::lua_reference(const
luabind::detail::lua_reference&)':
./luabind/detail/ref.hpp:54: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In member function 'bool
luabind::detail::lua_reference::is_valid() const':
./luabind/detail/ref.hpp:74: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In member function 'void
luabind::detail::lua_reference::get(lua_State*) const':
./luabind/detail/ref.hpp:94: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp: In member function 'void
luabind::detail::lua_reference::reset()':
./luabind/detail/ref.hpp:101: error: 'LUA_NOREF' was not declared in this scope
./luabind/detail/ref.hpp:102: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In constructor 'luabind::handle::handle()':
./luabind/handle.hpp:58: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In copy constructor
'luabind::handle::handle(const luabind::handle&)':
./luabind/handle.hpp:63: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In constructor 'luabind::handle::handle(lua_State*, int)':
./luabind/handle.hpp:72: error: 'LUA_NOREF' was not declared in this scope
./luabind/handle.hpp: In destructor 'luabind::handle::~handle()':
./luabind/handle.hpp:80: error: 'LUA_NOREF' was not declared in this scope
make: *** [wrapper_base.o] Error 1

I'm not sure how to fix these, help would be appreciatted.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Retreiving the calling function

Josh Green-3
In reply to this post by Bradley Arsenault
Say I have a function like this:

void superFunction(luabind::object obj, std::string funcName);

And I have registered it
Is there any way for me to figure out from which lua function this
function was called?

Like.... Could I traverse the stack in some way to figure out the
calling function?
Thanks all

--Josh

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Retreiving the calling function

Josh Green-3
Ok, figured it out, for those interested, this code was what I used:

void superFunction(luabind::object obj, std::string funcName){
        lua_Debug dbg;
        lua_State *lua = obj.lua_state();
       
        //Ok, figure out the calling function based on the lua stack:
        lua_getstack(lua,0 + 1,&dbg);
        lua_getinfo(lua,"f",&dbg);
        //lua_getinfo(lua, "S", &dbg);lua_getinfo(lua, "l",
&dbg);lua_getinfo(lua, "n", &dbg);

        //retreive this function object:
        luabind::object callingFunction(lua);
        callingFunction.set();


In the above code, the "callingFunction" object will be the
luabind::object of the function that called your C function

Thanks
--Josh

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Josh
Green
Sent: Saturday, 22 July 2006 5:54 PM
To: [hidden email]
Subject: [luabind] Retreiving the calling function


Say I have a function like this:

void superFunction(luabind::object obj, std::string funcName);

And I have registered it
Is there any way for me to figure out from which lua function this
function was called?

Like.... Could I traverse the stack in some way to figure out the
calling function? Thanks all

--Josh

------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your opinions on IT & business topics through brief surveys -- and earn
cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user