LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Porting to VS7.net caused redefinition errors.

When we ported our code from CVI to Visual Studio .NET (version 7.0), we kept getting these warnings:

c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\WinNT.h(4779) : warning C4005: 'THREAD_BASE_PRIORITY_MIN' : macro redefinition
c:\Program Files\National Instruments\MeasurementStudio\CVI\include\cvidef.h(140) : see previous definition of 'THREAD_BASE_PRIORITY_MIN'

The values were the same, but the cvidef.h/windows.h defines it twice.

2) We also saw other defines that actually had different values. I forgot which ones they were, and how we fixed it in our code to make it go away.
0 Kudos
Message 1 of 2
(3,008 Views)
Hi,

There are many things that can be defined twice when usign the CVI libraries and the windows.h file. my recomendation is to have separate files, one where you use the CVI functions and include all the CVI files; other files where you include the windows.h and any other includes you need that may interfiere with CVI's libraries. Using a method like this can save you possible linking errors.

I hope that helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(3,008 Views)