01-09-2008 06:03 PM
01-11-2008 08:12 AM
03-19-2008 03:43 PM
#if defined (_CVI_) && (_CVI_ > 850)
#pragma iso_9899_1999
#endif
Should be:
#if defined (_CVI_) && (_CVI_ >= 850) /* LabWindows/CVI 8.5 or greater? */
#pragma iso_9899_1999 /* enable ANSI C 89 features */
#endif
05-21-2008 06:53 PM
I can't get the C99 features to work even after using the pragma.
#pragma iso_9899_1999
I can't declare a variable in the middle of a block for example.
Menchar
05-22-2008 11:21 AM
05-22-2008 11:41 AM - edited 05-22-2008 11:42 AM
05-22-2008 02:42 PM
Menchar,
I'm glad it's working now.
But for the record, we (NI) only identified the pragma itself, not the conditions that should surround it.
Luis
05-22-2008 06:52 PM - edited 05-22-2008 06:54 PM
05-23-2008 11:18 AM
05-23-2008 11:27 AM
Well, you're not officially supporting the C99 stuff, and I would have guessed that there'd be some implementation issues, unless you have a very rigorous validation suite it's easy to miss side-effects when making compiler changes.
As best as I can tell, that should have worked. Probably need to tweak the pre-processor - I looked at the expanded source and the typedef's not getting expanded, so the compiler then gags on the non-native type.
I had been in the habit of using Win32 data types (e.g. INT, HANDLE, CHAR, BYTE, DWORD, UCHAR, etc.) to simplify interaction with the Win32 SDK - the SDK uses these types, and they can be used in CVI by including windows.h (which includes windef.h and winbase.h).
Menchar