LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI8.0 project code upconvert to CVI2012 error

Hi friends,

 

Recently, I plan to upgrade CVI from 8.0 to CVI2012.

There are some legacy project which was developed by CVI8.0,

when I build these project using CVI 2012, occurs similar errors in files mscal.c, toolbox.c, word2000.c, wordreport.c, excelreport.c, inifile.c, pwctrl.c, age444xa.c,

the errors are captured in attachment. All errors are related to winNT.h

Hope get your help!

 

Thanks

 

 

0 Kudos
Message 1 of 8
(3,616 Views)

Are you including Windows.h? If so, ensure that you are including it as the first include at the top of your file. There are conflicts between Windows.h and some of the CVI include files that are only resolved correctly if the Windows.h is included first.

 

Redeclaration Errors When Compiling a LabWindows/CVI Project

National Instruments
Message 2 of 8
(3,585 Views)

Hi Biel,

 

My Error is "undeclared identifier". And you can find the detailed error description in my last attachment.

Is it possible that winNT.h can't be used in windows7 64-bit OS? The file header of "winNT.h" is,

 

/*++ BUILD Version: 0091     Increment this if a change has global effects

Copyright (c) Microsoft Corporation. All rights reserved.

Module Name:

    winnt.h

Abstract:

    This module defines the 32-Bit Windows types and constants that are
    defined by NT, but exposed through the Win32 API.

Revision History:

--*/

 

and, my PC is windows7 64-bit version.

 

Regards.

0 Kudos
Message 3 of 8
(3,574 Views)

What location are you pulling WinNT.h from? LabWindows/CVI installs a copy of the Windows SDK that includes modified headers for compatibility with CVI. I notice that the errors you are getting are from a block of code in WinNT.h that is removed by an #ifndef by CVI. Make sure you are using the version of WinNT.h from C:\Program Files (x86)\National Instruments\CVI2012\sdk\include.

National Instruments
0 Kudos
Message 4 of 8
(3,553 Views)

Hi Biel,

 

I checked winNT.h directory, it is C:\Program Files (x86)\National Instruments\CVI2012\sdk\include. and i have attached this file.

Is this a CVI2012 bug?

 

Thanks.

 

0 Kudos
Message 5 of 8
(3,544 Views)

I don't think this is a bug, it is most likely a configuration issue. Is it possible to create an example project that reproduces this to send me? I would like to take a look at how your project is configured.

National Instruments
0 Kudos
Message 6 of 8
(3,520 Views)

Hi Biel,

 

Sorry for the late response as I have taken a long leave.

I tried to create a new project on CVI8.0, and build this project on CVI2012, it's OK.

Seems it is difficult to reproduces the error other than the legacy code.

 

0 Kudos
Message 7 of 8
(3,462 Views)

If this issue is specific to this project, could you send me that project? If you are not comfortable posting your project here on the forum, you can send it to me via private message.

National Instruments
0 Kudos
Message 8 of 8
(3,442 Views)