User forums > Using Code::Blocks
Compiling LUA Code with Code::Blocks
(1/1)
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.
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")
--- End quote ---
Adding support for non C/C++ files to the build system
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
Navigation
[0] Message Index
Go to full version