How to build LuaBind?

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

How to build LuaBind?

Postby Marthe on Fri Aug 14, 2015 3:59 am

Hi!

I'm trying to build LuaBind so I can use it for a project.

I have installed and built Boost. The Folder with all of Boosts components lies in "C:\Boost" and my BOOST_ROOT environment variable points to this location.
I have placed the LuaBind folder in C: too, and Lua 5.3 inside "C:\LuaBind\lua", which is where my LUA_PATH environment variable points.

When I run bjam on my Visual Studio 2012 Command Line inside the LuaBind directory, I only get this error:

"
error: Unable to find file or target named
error: '/C:/LuaBind//lua'
error: referred to from project at
error: '.'
"

I have looked in the manual for troubleshooting, but I have found no solution to this, so I was wondering if you could help me out because I have followed the install instructions with no success at all.

Any ideas on how to fix this?
Marthe
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 8
Joined: Fri Aug 14, 2015 3:54 am

Re: How to build LuaBind?

Postby dandymcgee on Fri Aug 14, 2015 8:46 pm

Marthe wrote:"
error: Unable to find file or target named
error: '/C:/LuaBind//lua'
error: referred to from project at
error: '.'
"

The double slash between LuaBind and lua looks super suspicious. Did you accidentally type two slashes when setting the path?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: How to build LuaBind?

Postby Marthe on Sat Aug 15, 2015 4:08 am

I know. The thing is, my path doesn't contain a double slash, and I can't find out why the error gives me a double slash there... :/

This is my exact LUA_PATH: "C:\LuaBind\lua"
This is my exact BOOST_ROOT: "C:\Boost"
Marthe
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 8
Joined: Fri Aug 14, 2015 3:54 am

Re: How to build LuaBind?

Postby Falco Girgis on Mon Aug 17, 2015 7:53 pm

I cannot help you with what you need, as I haven't used Visual Studio in years, and I don't even know what the fuck "bjam" is. The last time I tried to compile LuaBind was for my Dreamcast about 5 years ago, and I gave up and never looked back, because of its massive boost dependency.

Now out of curiosity, why have you chosen LuaBind? It's heavy-weight, has a gigantic Boost dependency (which I can't fucking stand), it's a pain in the ass to build, and it's slower than lots of other binding libraries. I am a huge fan of OOLua: http://oolua.org/, as it's fast, lightweight, and a shitload of features. It's also currently in development by a gentleman named Liam, who I have been in contact with all throughout the development of Elysian Shadows. He's a great guy and has actually made modifications to his library on my behalf. He's very receptive.

I have also been able to do very complex, crazy shit in our Elysian Shadows engine building off of the framework provided by OOLua. The Lua property browser and a lot of the reflective back-end of our Engine through Lua would not be possible without the core foundation Liam has built. It's powerful and is easy to build off of...

So yeah, I haven't helped you at all, but maybe I can convince you to use a superior library which will undoubtedly build far more easily for you... :mrgreen:
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10693
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL

Re: How to build LuaBind?

Postby Marthe on Tue Aug 18, 2015 10:52 am

I decided to try LuaBind because it seemed to have a lot of functionality. I'm not really a fan of Boost either, because of the size of that library. If will check out OOLua. If it's lightweight and actually possible to build without problems after problems I think I may end up using it.

Thank you for your recommendation. I really only need a lua binding with decent functionality, so it seems like OOLua is the better choice :)
Marthe
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 8
Joined: Fri Aug 14, 2015 3:54 am

Re: How to build LuaBind?

Postby Falco Girgis on Wed Aug 19, 2015 1:13 am

Awesome! Let me know if you have any questions.

Don't know if you've been following AiGD, but all of the "Selection View" Dock Widget functionality on the right of ESTk, allowing you to dynamically view and modify contents of arbitrary Lua data AND load/save C++ data as Lua data was all written as an attachment to OOLua. I showed some of my code to Liam, and he really likes what I did. I added the ability to bind C++ "properties" which are accessed as standard Lua variables and also the ability to iterate over userdata, which essentially lets you treat C++-proxied data 100% the same as you would treat any random Lua table... I'm going to give the code to Liam as an add-on to OOLua in the future, because I think it's super powerful and badass.

This is how you use my domain-specific language to create "properties" using existing OOLua-proxied methods:
Screen Shot 2015-08-17 at 7.18.50 PM.png
(116.72 KiB) Not downloaded yet


This is the end-result, a fully reflective property browser, where the C++ type "Area" has been proxied to Lua as though it were a standard Lua table with its fields all using the C++ getter and setter methods internally.
Screen Shot 2015-08-17 at 7.20.34 PM.png
Screen Shot 2015-08-17 at 7.20.34 PM.png (37.5 KiB) Viewed 1116 times
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10693
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL

Re: How to build LuaBind?

Postby Marthe on Wed Aug 26, 2015 2:21 pm

Actually, I have a question about how to link the library.

I went on and generated projects for Visual Studio using Premake5 which went fine. When I tried to build the oolua.lib, I got an error saying it couldn't find lua/lua.h in the include directory, so I added a folder with the include files from Lua and it built fine. Then I went on and added all the includes from OOLua into my include directory in Visual Studio and added oolua.lib to my library directory. Then I went into the Porject Properties in Visual Studio -> Linker -> Input -> Additional Dependencies and added oolua.lib to the list there. This process has worked fine for every other library I'm using, but whenever I try to do something with OOLua, I get a LNK2019 Error (in this case I just tried to create an OOLUA::Script object:

error LNK2019: unresolved external symbol "public: __thiscall OOLUA::Script::Script(void)" (??0Script@OOLUA@@QAE@XZ) referenced in function "private: void __thiscall Game::init(void)" (?init@Game@@AAEXXZ)
error LNK2019: unresolved external symbol "public: __thiscall OOLUA::Script::~Script(void)" (??1Script@OOLUA@@QAE@XZ) referenced in function "private: void __thiscall Game::init(void)" (?init@Game@@AAEXXZ)

As far as I know, this indicates that something is wrong with the linking, but I can't seem to fix it. So if anyone here is using Visual Studio and have any idea on how to solve this, I would love you ^^
Marthe
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 8
Joined: Fri Aug 14, 2015 3:54 am


Return to Programming Discussion

Who is online

Users browsing this forum: No registered users and 1 guest