08-26-2011 10:09 AM
Hi,
Is it easier to convert a Microsoft Visual C++ project into Lab Windows CVI project? Sample codes wich came with COTS card are in C++. Is there a tool in Lab Windows CVI to convert them into C files.
Thanks,
Suni
08-26-2011 05:33 PM
Not that I know of.
Sometimes a "C++" module isn't much more than a "C" module since it's possible to write procedural code in C++ and not use classes and objects. If your sample project doesn't use classes or objects, then it'd be a simpler task to convert it to C, which CVI uses.
The GUI operation / event model is different between the two development environments, and if there's a substantial GUI it's likely that could be the hardest to get converted to CVI.
Why do you need to convert to CVI? Especially if it's just a sample project?
Do you have a "C" interface to the COTS card? If not, converting the sample project to CVI and C won't do you much good.
Someone from NI can probably speak to the issue of VC++ and CVI interoperability better than this, but I think getting the VC++ project running in CVI could be a big task and not worth the cost.
08-29-2011 08:58 AM
Thanks for the reply.
COTS card came with all the header files which is in C. Just the sample applications came with C++ because those have GUI's. I am used to using Lab windows CVI and i need to integrate another COTS card to the system which has C files. Now i am trying to come up with sample program in Lab windows CVI using those header files. So lab windows user interface is not the same as GUI in c++?
08-29-2011 12:28 PM
Nope, they're different.
You could build and run the VCPP project and take a look at the GUI, then recreate the panels and controls in a CVI project. This is quite doable if you have a simple GUI.
Since you have a "C" interface to the COTS software, you can invoke that interface from CVI - I've done this with COTS libraries. Pick a simple function out of the COTS library that has an observable effect and see if you can get it to run from a simple CVI project.