LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

why utility.h and windows.h can't be include in one file ?

I include utility.h and   windows.h in one c file ,when I compile the file it return the error of /////
 LAUNCH_EXE.c - 19 errors
  "winbase.h"(2645,6)   Redeclaration of 'CVI_GetFileSize' previously declared at utility.h:537.
  "winbase.h"(2786,6)   Redeclaration of 'CVI_GetFileTime' previously declared at utility.h:538.
  "winbase.h"(2796,6)   Redeclaration of 'CVI_SetFileTime' previously declared at utility.h:576.
  "winbase.h"(3103,6)   Redeclaration of 'CVI_Beep' previously declared at utility.h:482.
  "winbase.h"(3119,6)   Redeclaration of 'CVI_GetSystemTime' previously declared at utility.h:427.
  "winbase.h"(3133,6)   Redeclaration of 'CVI_SetSystemTime' previously declared at utility.h:454.
  "winbase.h"(5872,32)   Redefinition of macro 'DeleteFile'.
  "winbase.h"(6006,28)   Redefinition of macro 'CopyFile'.
  "winuser.h"(9263,66)   Redefinition of macro 'HELP_CONTEXT'.
  "winuser.h"(9264,56)   Redefinition of macro 'HELP_QUIT'.
  "winuser.h"(9266,34)   Redefinition of macro 'HELP_CONTENTS'.
  "winuser.h"(9267,68)   Redefinition of macro 'HELP_HELPONHELP'.
  "winuser.h"(9269,34)   Redefinition of macro 'HELP_SETCONTENTS'.
  "winuser.h"(9270,34)   Redefinition of macro 'HELP_CONTEXTPOPUP'.
  "winuser.h"(9272,80)   Redefinition of macro 'HELP_KEY'.
  "winuser.h"(9273,34)   Redefinition of macro 'HELP_COMMAND'.
  "winuser.h"(9274,34)   Redefinition of macro 'HELP_PARTIALKEY'.
/////
 why??? how to solve the problem!1
0 Kudos
Message 1 of 3
(4,534 Views)
Try to put #include <windows.h> at the top of the include list.

  #include <windows.h>

  * * *

  #include <utility.h>
 
and so on.  Let me know if this solves the problem!  If so, it was a macro definition problem!

graziano
Message 2 of 3
(4,531 Views)
pass,thanks!!
0 Kudos
Message 3 of 3
(4,524 Views)