LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

imcompatiblity of Borland C++ header files and LabWindows/cvi head files

when a C++ code has the head file windows.h (C++ compile head files) and the formatio.h (LW/cvi head files), it can not be compiled in a C++ compiler. I did not understand why. Recently I found relative information on this in the Lw/cvi Online help (i.e explain on OpenFile function. It says "CAUTION:   The Windows SDK also contains a OpenFile function. If you include windows.h and do not include formatio.h, you will get compile errors if you call the OpenFile function.")

It seems that there is incompatibility of windows.h and formatio.h, so what should we do if we should use both in a code? how to solve this incompatility?
0 Kudos
Message 1 of 2
(2,941 Views)
As noted in the LabWindows/CVI Programmer's Reference Manual found in your ...\cvi\manuals directory, you should #include all Windows SDK header files before CVI header files in your source, because the CVI header files have preprocessor protections against redefinitions of the same functions in separate libraries.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 2
(2,941 Views)