LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

64-bit integers LabWindows CVI 8.0.0

I have send a response on this forum that CVI 7.0 supports 64-bit integers (by Mr. Matthews).

 

We run CVI 8.0.0 and the following code does not compile:

 

#define UInt64 unsigned long long
#define Int64 signed long long


UInt64 temp = 0;

 

Produces the error "Invalid use of 'long'."

 

Can I assume that this is not true and that CVI 8.0.0 and 7 do not support 64-bit integers?

 

Christopher Povey

Principle Test Systems Engineer for BAE Systems.
0 Kudos
Message 1 of 5
(3,901 Views)

Browser crashed.  Moderators please delete duplicate thread.

Christopher Povey

Principle Test Systems Engineer for BAE Systems.
0 Kudos
Message 2 of 5
(3,897 Views)

The CVI help on Data Types shows both unsigned __int64 and __int64 available for 64 bit integer work. I have used them without difficulty from CVI 7.0 onwards, although some people have reported compiler issues with certain use cases - a search of the forum should soon find the related threads.

 

JR

0 Kudos
Message 3 of 5
(3,894 Views)

Hello Christopher,

 

The long long syntax was only introduced in version 8.5. In previous versions, you would have had to use__int64, as JR pointed out.The two types are equivalent.

 

Luis

 

 

0 Kudos
Message 4 of 5
(3,867 Views)

I have recoded the function to use __int64 and binned my Watcom C DLL that did the work before.  It compiles up okay, but I have not had chance to run it yet.

 

I have had a look through the forum on __int64 issues, and all my variables are non static so I should not get the GPE problem.

 

Thanks.

Christopher Povey

Principle Test Systems Engineer for BAE Systems.
0 Kudos
Message 5 of 5
(3,857 Views)