2

Background: I have C++ DLL's which are part of a web application. I'm in the position where the UI, which is invoking parts of my code is under development and the C++ code is being developed as well. This creates a lot of integration issues. In order to solve this I wanted to call the C++ code externally in another language (similar to what happens to the UI) not related to the UI and that way test my code.

I'm currently exploring on how to achieve this and would like to ask for your help on which tools to do that.

In a nutshell what I want to do is to bypass the UI layer to perform testing (Maybe in the future, create some JSON/XML based server for automation).

Update after further research and thinking about the problem:

  1. ChaiScirpt- Looks promising to what I want, but I can't seem to find other projects that use that. Does it support 64 bit? How does it handle non standard code.

  2. Swig -Looks like a great project. No 64 bit support? A lot of work with gluing the layers?

  3. node.js : Seems to be compatible with windows, V8 gives you js. Support 64 bit and there is a nice embedding guide. How much workload is it?

I run the app on Windows 2003, I'm using VC6. In the process of porting to VC11 (VS2012)

A good solution would include minimal work on exposing the C++ interface, long-term development and support for 64bit/Unicode.

qballer
  • 2,033
  • 2
  • 22
  • 40
  • What environment are you using - is it an option to make the DLL an in-proc COM server? – Dabbler Nov 06 '12 at 16:09
  • Windows 2003. Sometimes windows 7. – qballer Nov 06 '12 at 16:10
  • 1
    I would consider COM, but let me add that since you want to mix languages, it would have to be an out-of-process server, not an in-proc one. Not that it's a big difference in terms of implementation. You can generate a type library from the IDL which will let you automate your code from other environments, e.g. VB. – Dabbler Nov 06 '12 at 16:13
  • some explanations would be great. Feel free to "link" the hell out of me. Thanks. – qballer Nov 06 '12 at 16:15
  • 2
    Since you already have an IDL file, this may be an appropriate starting point: http://resources.esri.com/help/9.3/arcgisdesktop/com/COM/ExtendAO/TypeLibrariesAndIDL.htm. The essential bit is adding "oleautomation" to the IDL file. I don't know how knowledgeable you are on COM. Two books I can recommend are Inside COM by Dale Rogerson and Essential COM by Don Box. – Dabbler Nov 06 '12 at 16:21
  • 2
    I'm one of the developers of ChaiScript. Yes, it's fully tested for 64bit and the error reporting has recently been greatly enhanced. Since you're on Windows, you'll have to also require Boost to use ChaiScript. (we have a C++11 port, but MSVC++ doesn't yet support enough C++11 features for our needs). For a large project using ChaiScript, look at OpenTransactions. SWIG is probably more complex than you want, since it adds extra build steps, but it is rather flexible and also works fine with 64bit. – lefticus Dec 18 '12 at 00:46

0 Answers0