English 中文(简体)
扩大C++应用范围,附上嵌入文字
原标题:Extending a C++ application with embedded scripting

I am developing a C++ application that needs to be multiple platform compatible (Windows/Linux) and want to grant users the ability to extend the software to fit their needs exactly without allowing them to change critical parts of the application (so I do not want them in the C++ code).

我所期待的是插入一个描述性的语言(由于我已经熟悉这段话,但并非强制性的),因此,如果我想要改变这些物体的话,用一些假想的夹中的文字就可以操纵申请的物体。

最简单的事例是:如果有人想为我的申请建立自己的调查小组,他们就应当能够这样做。

然而,问题是,我从未把C++和任何外部文字放在一起,因此我确实不知道如何开始。 在寻找材料开始后,我发现Lua声称是这样做的良好语言,但我找不到良好的开端教员。

www.un.org/Depts/DGACM/index_spanish.htm 如果有人知道一个良好的开端,无论是在线资源还是一本好书,我会真心感激。 我不想在一本好书上花几个桶。

作为学习者,我倾向于从示范守则和解释这些守则的几条线中学习最好。

最佳回答

I would suggest you to read Programming in Lua, this book has an entire section on how to embed Lua in C (and C++).

http://www.amazon.com/Programing-Lua-second-Roberto-Ierusalimschy/product-reviews/8590379825/ref=dp_top_cm_cr_acr_txt?ie=UTF8&showpoints=1”rel=“nofollow noretinger”>Amazonuser

该语言还很贴现

问题回答

The article here at linux journal, is a well place tostart on how to embed a python Interpretation in their c/c++ Code. 然而,这只是战斗的一半,因为当翻译被穿透时,你需要将一部分软件出版给描述环境。 这样做的基本计划是C的,如果你的大多数法典是C++,则最好使用增强力:从撰写以来就算起。 围绕你的C++课程进行总结可能很麻烦。 你们也可以利用Py++来提高动力:使python具有约束力。

如果你只想把文字描述作为通俗的门,而且你可以怀着大on的记忆,那么,它可能比卢阿更好的选择。 Lua通常有利于发展游戏等小型环境。 还有一些比卢塔开发商以及更多的建筑图书馆和第三方图书馆更多的金星开发商。

我猜想的是,这所增强的图书馆就是这样做的。 至于Lua,我用了自己,但一个快速的谷歌搜索首先导致我升到debian admin,然后到。 Lua s C接口。 你们是否看待这些问题?





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签