ToLua++

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
JesseGuarascia
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 70
Joined: Mon Dec 13, 2010 10:55 pm

ToLua++

Post by JesseGuarascia »

Okay, seriously, this has been bothering me for the past almost 3 hours now! :evil: :evil: :evil:

So I was trying to integrate Lua and C++ for my game. I figured using another wrapper would be good, so I had to choose between toLua++ and LuaBind. The latter is Boost dependent, and I'm never going to attempt to have my friend (the other person using this application), to ask what Boost is >.>.

I chose the former, toLua++... and I'm starting to think I shouldn't have. Not once, has any sort of attempt at building yielded anything other than a handful of "unresolved external" errors. If anyone has a tutorial/video/site on how to compile toLua++ using VS 2010 (SCons hates me :cry: ). Alternatively, if anyone has the pre-built .exe, and .lib/.dll files, I'd love you forever! :D
-- Jesse Guarascia

I like C/++, SDL, SFML, OpenGL and Lua. If you don't like those, then gtfo my sig pl0x (jk trollololololol)
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: ToLua++

Post by dandymcgee »

I had this exact same problem when I first tried getting tolua++ to work. After months of struggling with bullshit like scons and trying to find a precompiled version Falco then asked me, "Why don't you just compile it in Visual Studio dude?". *facepalm* Sometimes the simplest solutions are the best. ;)
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
JesseGuarascia
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 70
Joined: Mon Dec 13, 2010 10:55 pm

Re: ToLua++

Post by JesseGuarascia »

dandymcgee wrote:I had this exact same problem when I first tried getting tolua++ to work. After months of struggling with bullshit like scons and trying to find a precompiled version Falco then asked me, "Why don't you just compile it in Visual Studio dude?". *facepalm* Sometimes the simplest solutions are the best. ;)


:lol: I had the same idea at first; just do it in VS. But noooooooooo, for some reason, whenever I compile it in VS, I get undefined external errors. Idk what I'm doing wrong, but it must be something really stupid :/
-- Jesse Guarascia

I like C/++, SDL, SFML, OpenGL and Lua. If you don't like those, then gtfo my sig pl0x (jk trollololololol)
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: ToLua++

Post by dandymcgee »

There are a few different parts of the project, there's tolua++.exe which generates your binding code from cleaned headers, then there's the tolua++.lib library which you include with your project. You'll need to compile both (but I think it's the same project). Honestly I've long forgotten how to configure it, but I don't remember it being too much trouble when I realized I could use Visual Studio to compile it.

I'm working on the forums at the moment, but maybe a little later I'll compile it again as to remember what's required.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
JesseGuarascia
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 70
Joined: Mon Dec 13, 2010 10:55 pm

Re: ToLua++

Post by JesseGuarascia »

dandymcgee wrote:There are a few different parts of the project, there's tolua++.exe which generates your binding code from cleaned headers, then there's the tolua++.lib library which you include with your project. You'll need to compile both (but I think it's the same project). Honestly I've long forgotten how to configure it, but I don't remember it being too much trouble when I realized I could use Visual Studio to compile it.

I'm working on the forums at the moment, but maybe a little later I'll compile it again as to remember what's required.
That'd be great if you could do that! THANKS SO MUCH! :D
-- Jesse Guarascia

I like C/++, SDL, SFML, OpenGL and Lua. If you don't like those, then gtfo my sig pl0x (jk trollololololol)
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: ToLua++

Post by dandymcgee »

Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
JesseGuarascia
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 70
Joined: Mon Dec 13, 2010 10:55 pm

Re: ToLua++

Post by JesseGuarascia »

dandymcgee wrote:Try this: tolua++%201.0.93%20MSVC2008.zip
It doesn't work :(

I LOVE YOU! XD
-- Jesse Guarascia

I like C/++, SDL, SFML, OpenGL and Lua. If you don't like those, then gtfo my sig pl0x (jk trollololololol)
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: ToLua++

Post by dandymcgee »

JesseGuarascia wrote:
dandymcgee wrote:Try this: tolua++%201.0.93%20MSVC2008.zip
It doesn't work :(

I LOVE YOU! XD
Lol, glad you got it working. Just a heads up, if you're using tolua++.exe to generate your bind code it doesn't automatically put the #include statements in the .cpp file and you'll need to put a function declaration in the generated header to allow other files to call the generated function.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply