LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

converion of microsoft visual c++ project to lab windows cvi

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

0 Kudos
Message 1 of 4
(3,178 Views)

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.

0 Kudos
Message 2 of 4
(3,167 Views)

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++?

0 Kudos
Message 3 of 4
(3,153 Views)

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. 

0 Kudos
Message 4 of 4
(3,147 Views)