News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Compiling LUA Code with Code::Blocks

Started by jakovo, July 15, 2010, 10:59:33 PM

Previous topic - Next topic

jakovo

Hi,

in the current project I'm on, I need to compile some code in LUA (using obviously the lua compiler).

1) is there any way to tell Code::Blocks that I want to use a different compiler from the list it has by default?...

2) and is there anyhow to build the whole project so that my C++ code gets built with the default C++ compiler, and my LUA files get compiled with its "luac" compiler?
(I've seen that by selecting a specific file you can choose special build options for it, but I can't ask it to use "luac")

Thanks!

oBFusCATed

Haha, compiling lua code... haha...

Lua is interpreted language, so there is no compiler (technically there is a luaJIT and other similar compilers).

Probably what you need is to embed the lua interpreter in c++ program,
if so, probably you have to look into luabind (very good library, but a bit heavy on the compiler) and similar libraries.
If you want to achieve something else, please explain better.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

mandrav

Quote from: jakovo on July 15, 2010, 10:59:33 PM
in the current project I'm on, I need to compile some code in LUA (using obviously the lua compiler).

1) is there any way to tell Code::Blocks that I want to use a different compiler from the list it has by default?...

2) and is there anyhow to build the whole project so that my C++ code gets built with the default C++ compiler, and my LUA files get compiled with its "luac" compiler?
(I've seen that by selecting a specific file you can choose special build options for it, but I can't ask it to use "luac")

Adding support for non C/C++ files to the build system
Be patient!
This bug will be fixed soon...

jakovo

@oBFusCATed: yes, though LUA is an interpreted language it has a compiler (not to native code, but to a binary intermediate code wich can be run by the interpreter).

@mandrav: Hey!.. Great!.. Thanks!.. I think that'll do!... just what I was looking for!

Thank you both, guys!

jakovo