LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to compile the IXchariot API

Hi,
I am using Ixia Chariot ver 6.00
The API that I'm using does not seem to compile under CVI ver 6.00.
It keeps showing me the following error message:
"Invalid use of 'long'"
when trying to compile the line:
#define long long CHR_WLONG;
 
Has anyone encountered this problem before, or managed to work with the IXIA Chariot API?
Any help is appreciated,
Thanks
 
0 Kudos
Message 1 of 5
(3,662 Views)
Hello,

So the line #define long long CHR_WLONG; doesn't seem to be correct because first, you have a double data type declaration (long long), and you are trying to redefine the datatype long to a constant CHR_WLONG. 

Instead, you might mean to define
CHR_WLONG as a long:
const long CHR_WLONG;
-or-
#define
CHR_WLONG long;

Both of the declarations above will compile without error.  Hope that helps.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 5
(3,654 Views)
Thanks for the quick reply.
Is there any way of using a "long long" type?
Your previous suggestion invovles using a long instead of the double long found in the Chariot API header.
I doubt it the functions will function properly with long type.
 
 
 
0 Kudos
Message 3 of 5
(3,646 Views)

Hi ebelisha,

When you declare a "long long" datatype what are you looking to get? 

If you want to get a 64 bit integer (I'm assuming this because long is 32 bit integer and you wanted double long), there is a way to declare this.  You can use the __int64 declaration to get a 64 bit integer.  The following link from MSDN describes the datatype.  Note that __int64 is not an ANSI C data type, it's MS specific, so you will have problems trying to compile the code on a UNIX based system.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng/htm/basic_45.asp

0 Kudos
Message 4 of 5
(3,632 Views)
The __int64 notation is supported in CVI to denote a 64-bit integer, but only from version 7.0 onwards. The CVI 6.0 compiler did not support 64-bit integers.

Luis
NI
0 Kudos
Message 5 of 5
(3,623 Views)