You are not logged in.

  • Index
  •  » General Help
  •  » [RESOLVED] I think there is some kinda conflict or something with G()

#1 2011-02-15 04:30:23

owen
Member

[RESOLVED] I think there is some kinda conflict or something with G()

So i started using the Lua build for wii and in it do background scripting.  took a while for it to install but once I included it in my GRRLIB project I got a G() is being redefined error in the Lua source header file;

#define G(L)    (L->l_G)

My program compiles but some 3d cubes that I draw end up being stretched in infinitely in the Y direction.

I thought I would rename the definition on the GRRLIB header file which gets rid of the warning but the random artifacts keep happening once I start using LUA code. 

Lua source is :  http://wiibrew.org/wiki/Lua

Any way is there anyway I can solve this problem?  or am I doomed?

Offline

 

#2 2011-02-15 06:07:32

Crayon
Bad Mother Fucker

Re: [RESOLVED] I think there is some kinda conflict or something with G()

Try to use the #undef Directive.

Try it before including grrlib.h and/or lua header. Try to switch the order of include too.

Offline

 

#3 2011-02-15 17:38:28

owen
Member

Re: [RESOLVED] I think there is some kinda conflict or something with G()

Doubt undef will work since both libs make heavy use of the macro.  I will try to re-order the includes and see how that goes tonight.

Offline

 

#4 2011-02-17 14:03:38

owen
Member

Re: [RESOLVED] I think there is some kinda conflict or something with G()

I resolved the issue by keeping them into totally separate C files and never including both at the same time.  I only included the header to the lua api when needed.  That seems to work for now.

Offline

 

#5 2011-02-21 17:15:57

owen
Member

Re: [RESOLVED] I think there is some kinda conflict or something with G()

Also note that I was including the lstate.h file from Lua which is unecessary.  So everything should be business as usual, and so both libraries work together as expected as long as lstate is not included.

Offline

 
  • Index
  •  » General Help
  •  » [RESOLVED] I think there is some kinda conflict or something with G()

Board footer

Powered by FluxBB