From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 2010 Build problem with Redeclaration Errors with "winnt.h"

Hello

   My program uses windows SDK and has <windows.h>  inlude file before everything else in the main.C file but I still get the same error ("WinNT.h"(8383,80) Redefinition of macro 'THREAD_BASE_PRIORITY_MIN'.).  I have seen other posts indicating  to rearrange include order but that is not helping me. I still get the same error no matter, I have also rearranges the  file orders in the project so that main.c compiles first.  Anyone has ran into this before?  Are there CVI specific files that load winnt.h before the files listed in the project? How is the compile order get set in the project?

 

Thanks

)

0 Kudos
Message 1 of 3
(2,995 Views)

Hello, 

 

     Which libraries and headers are you including?  it seems like one piece of code in stomping on another piece of code.

 

Daniel

0 Kudos
Message 2 of 3
(2,963 Views)

Hello,

 

     The following error is occured in the Pre-processor portion of the code.   I feel like the best way to determine where the error is occuring is to add <New Line> #error <NewLine>  in header files and before and after #include staatements in your code until you can narrow down exactly where the error is being thrown.
     This method takes time but it will typically help us find the exact point of the problem.

Daniel

0 Kudos
Message 3 of 3
(2,936 Views)