LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting C++ header files to use in LabWindows

Hello,
I am trying to develop a program with LabWindows to process images from a camera, using Common Vision Blox, a C++ software developped by Stemmer Imaging.
There is no Labwindows driver for this software but they told me it was possible to use all the dll functions as Labwindows is a Ansi C compiler. 
 However as it is "only" a Ansi C compiler, I cannot use the provided header files directly and I have to adjust them.
It seems that there are only some minor changes to do but I have no clue
Can someone help me to convert them ?
I would be very pleased.
 
Below is the kind of thing I have but not only:
message=
"iCVCImg.h"(357,108)   syntax error; found '&' expecting ')'.
 
the line 357:
 
  IMPORT(void)                    SetRectArea               ( double L, double T, double R, double B, TArea& Area );
 
 
Thanks a lot
 
damien
0 Kudos
Message 1 of 4
(3,631 Views)
Hi !
 
I just passed a C++ exam a couple of months ago...The '&' is the problem because that is a 'reference' in C++ and that does not exist in C, but this is just slightly different to 'call by reference' in C. I suggest you try to change the line in the header file:
 
IMPORT(void)                    SetRectArea               ( double L, double T, double R, double B, TArea& Area );
 
to
 
IMPORT(void)                    SetRectArea               ( double L, double T, double R, double B, TArea *Area );
 
 
but I can't give guarantees...
0 Kudos
Message 2 of 4
(3,612 Views)
Hi Han,

Thanks a lot for your suggestion...indeed it works !!

it was long to do but simple and now the program is Pk with these header files.
I still had to remove some parts where other problems arise but it seems that it does not care for the moment.

If I have other problems I will surely contact you !! 🙂

Hope you had a good mark at your exam at least!

Thank you

all the best

Damien
0 Kudos
Message 3 of 4
(3,555 Views)
Good to hear this worked for you ! But make sure you test it thoroughly.
0 Kudos
Message 4 of 4
(3,542 Views)