Click to See Complete Forum and Search --> : Extending a scripting language with C++


Fiete
June 5th, 2008, 03:05 AM
Hello,

I need some hints from experts about how to extend a scripting language with C++ and what script language is the best for this purpose. My native language is german and so my english is not very well, but I try to explain.

I have an application which can be started in order to sent commands to a smart card. In the process the application loads a DLL and executes the tasks which are implemented within the DLL. The job is perfomed within a worker-thread. If I need a new job with different commands I take a new DLL which implements all the new functions needed, according to the requirements. Each DLL can be slightly controlled via input-files, like ini, xml and so on...

For faster development und more flexibility I now want to have an additional scripting solution. In the process the application loads a DLL which in sequence loads a script text file. It should be possible to program like javascript but must not be a similar syntax. In addition it must be possible to execute the script in a worker-thread.

Due to the fact that I have to attach third-party libraries written in C++/MFC to access the smart card (and more) I need a scripting language which can be extended with user-defined functions, variables and objects to make the underlying functionality accessible through the script.

I know that several solutions are possible and available but I'm not experienced with such topic and try to do the 1st time from scratch.
So, my question is if any expert is out there which has good knowledge to give me some hints for a starting point.

Thanks in advanced

DreamShore
June 5th, 2008, 04:44 AM
I've not much knowledge about scripting language. But I feel Python is fairly easy to learn and to use. The day I knew it, I managed to make it work with my extension dll.

PredicateNormative
June 5th, 2008, 05:59 AM
I'd personally use python. You can use SWIG(http://www.swig.org) to wrap C++ libraries and code into python objects.