• Forum
  • Lounge
  • What is the best C++ logical engine / la

 
 
What is the best C++ logical engine / language extension?

Today, everything uses DLL, which is OS dependent (even if compiled in all operating systems). I'm thinking in use a engine, an extern file that my program interprets and run. I looked at Google's V8 and Mozilla's SpiderMonkey, but it's too time wasting and they only made that for Cygwin :( . I think that XML isn't a good idea, too...
There is any good extension for C++ (it would be better if doesn't need another programs...) that uses another language or script?
I recommend LuaJIT. It's nearly as fast as C++ code, and it can be embedded in your code. All you need after you've installed it is to provide binding functions, and then you need to create a package/module manager.

I would implement a package/module manager using ZIP and JSON files for the packages.
Last edited on
Most scripting languages can be embedded in C or C++ programs. Lua and python are popular choices for this.
Does LuaJIT, Lua or Python (I program in Python and I know that PY FILES ARE INTERPRETED, BUT DON'T KNOW IF IN NATIVE EXTENSIONS ...) need any other software? I don't want to need Python interpreter...
ANOTHER DIFFERENT QUESTION
I'm trying to create one project named "Web++". It evaluates entered functions and create Web files with proprieties. I'm implementing my own method, but how can I evaluate these functions?
e.g.:
1
2
3
4
5
6
7
8
9
10
open "Project"
create tag html
create tag head
create tag title
at title add "Title of page"
close tag title
close tag head
access "Project.css" (create class "ClassName")
access "Project.css" (class."ClassName")
add propriety("font:color=\"orange\"")
To your original question: No, LuaJIT is embedded directly into your program. It can be linked either as a static or shared library. Building it may be a bit difficult sometimes, but most of the time it'll be quite simple. Once it has been built and linked, just read up on some normal tutorials for Lua and integrating Lua with C/C++.
(In addition, I believe Boost provides a library for integrating Python directly into your program, but I've never used it myself.)

To your second question: If you're trying to parse these values, you'll most likely want a parser generator, which allows you to parse these files in a much simpler manner than parsing them yourself.
Last edited on
Thanks! Solved!
Topic archived. No new replies allowed.