LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

missing includes

I'm not sure if I missed something during the install but I'm try to use includes such as iostream, sstream, string. When I first compiled I got an error message saying they don't exist, would I like to search for them. I said yes and grabbed them out of ProgramFiles\Microsoft Visual Studio\VC98\Include .

Now when I compile I get an error messages for the EH.H file:

 

Sirius_rev1.c - 20 errors, 1 warning
 "EH.H"(32,2)   "eh.h is only for C++!"
 "exception"(49,15)   syntax error; found 'identifier' expecting ';'.
 "exception"(50,1)   syntax error; found '{' expecting ';'.
 "exception"(51,7)   syntax error; found ':' expecting ';'.
 "exception"(52,16)   Redeclaration of 'exception' previously declared at exception:49.
 "exception"(53,31)   syntax error; found '&' expecting ')'.
 "exception"(53,33)   Redeclaration of 'exception' previously declared at exception:52.
 "exception"(54,30)   syntax error; found '&' expecting ')'.
 "exception"(54,32)   Redeclaration of 'exception' previously declared at exception:53.
 "exception"(55,14)   syntax error; found '&' expecting ';'.
 "exception"(55,14)   Unrecognized declaration.
 "exception"(55,33)   syntax error; found 'identifier' expecting ')'.
 "exception"(55,43)   Illegal expression.
 "exception"(56,13)   syntax error; found '~' expecting ';'.
 "exception"(56,13)   Unrecognized declaration.
 "exception"(56,25)   Redeclaration of 'exception' previously declared at exception:55.
 "exception"(57,13)   syntax error; found 'identifier' expecting ';'.
 "exception"(57,31)   syntax error; found 'const' expecting '{'.
 "exception"(57,36)   Warning: Empty declaration.
 "exception"(59,5)   Unrecognized statement.
 "exception"(59,5)   Unrecognized statement.

 

Anyone have an idea what is wrong?

 

Thanks,

Mike

0 Kudos
Message 1 of 3
(3,848 Views)

Hi Mike,

 

You should use the include files that come with CVI, not the ones from Visual Studio... for my configuration (XP, CVI2009), they can be found at C:\Program Files\National Instruments\CVI2009\include\ansi

 

Good luck,

 

Wolfgang

0 Kudos
Message 2 of 3
(3,842 Views)
iostream, sstream etc. are C++ concepts. CVI only supports development in C, not C++.
--
Martin
Certified CVI Developer
Message 3 of 3
(3,831 Views)