"Success is the sum of small efforts, repeated day in and day out." - Robert Collier   |    "Take calculated risks. That is quite different from being rash." - George S. Patton   |    Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.   |    "Nothing will ever be attempted if all possible objections must first be overcome." - Samuel Johnson   |    "Nothing can stop the man with the right mental attitude from achieving his goal; nothing on earth can help the man with the wrong mental attitude." - Thomas Jefferson   |    "The more you learn, the more you need to learn." - Robert Heinlein   |    "Good luck' follows careful preparation; 'bad luck' comes from sloppiness." - Robert Heinlein   |    "The more difficulties one has to encounter, within and without, the more significant and the higher in inspiration his life will be" - Horace Bushnell   |    "Nothing great was ever achieved without enthusiasm." - Ralph Waldo Emerson   |    "Perl - The only language that looks the same before and after RSA encryption." - Keith Bostic   |    "We are what we repeatedly do. Excellence, therefore, is not an act but a habit." - Aristotle   |    "There is no such thing as luck; there is only adequate or inadequate preparation to cope with a statistical universe." - Robert Heinlein   |    "We are still masters of our fate. We are still captains of our souls." - Winston Churchill   |    "The talent of success is nothing more than doing what you can do, well." - Henry W. Longfellow   |    "The big secret in life is that there is no big secret. Whatever your goal, you can get there if you're willing to work." - Oprah Winfrey   |    "Every artist was first an amateur." - Ralph Waldo Emerson   |    "Our doubts are traitors, and make us lose the good we oft might win, by fearing to attempt." - William Shakespeare   |    "If Java had true garbage collection, most programs would delete themselves upon execution." - Robert Sewell   |   

Code Reactor

The best of modern Web development

tolua++ windows precompiled binary exe file download and more instructions on tolua++.

So, since the last post, I have started embedding lua and has had some minor problems.

First I tried using luabind, which didn’t work at all for me. I didn’t want to include and build both luabind and boost (which it requires), and all of the precompiled solutions didn’t work either on my setup for different reasons, plus I just didn’t have time nor motivation to spend an hour trying to setup paths, projects, solutions, includes and so on for a library which should be precompiled.

So I thought screw luabind and I will go with tolua++. Which does almost the same thing but in a different way. Basically, luabind is like a library with a lot of macros, which you use to define your bindings in certain way in your code, and when the macros get expanded before compilation, the bindings start working. Tolua++ (and its predecessor tolua) on the other hand, only includes a very small runtime library, and most of the work is done before compilation by an external command line tool. It takes in special header files which you must write for your bindings and converts them to cpp files which you then include into your project like any other cpp file, and all the bindings are defined there. (This step is automated of course, you only define the special header and include the output file once).

tolua++ doesn’t require boost, which would mean less trouble compiling it, and also I thought that the exe file itself would be just downloadable precompiled.

However it wasn’t. But now after some time figuring out the compilation routine, I have compiled it and thought that I can put it out here for everyone who wants to save an hour or so by just fetching the file which should have been available from the author’s site from the beginning.

Anyways, here is the binary. It is for win32 and is tolua++ 1.0.93:

tolua++ 1.0.93 compiled binary (exe).

When compiling this, I have had a great help from this guide: http://lua-users.org/wiki/CompilingToluappWithoutScons

Although some things in that guide seemed to be incorrect, so here is my modified version: Tolua++ compilation guide.

As for actually using the tolua++, here is another awesome guide which should get you started: http://www.icynorth.com/forums/viewtopic.php?t=301

Leave a Reply

You must be logged in to post a comment.

loading...
Your connection appears to be too slow, automatically disabling HeavyAjax (TM) for better performance...
You seem to run a browser without JavaScript support or it has been disabled. To fully experience Code Reactor please enable JavaScript. (It is not 1995 anymore :)
You seem to be using Internet Explorer. If you want to experience both Code Reactor and the rest of the web to their fullest and fastest, you are advised to download and install a real browser, like Opera, Firefox or Google Chrome.
Close
You seem not only to use Internet Explorer, which is by far a joke when it comes to browsers, but to even use an old version of it!
If you want to experience both Code Reactor and the rest of the web to their fullest and fastest, you are STRONGLY advised to download and install a real browser, like Opera, Firefox or Google Chrome.
Close