LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Redeclartion of 'Point' and 'Rect' Error when including extcode.h to CVI project

When including header file for external dll in my application and including extcode.h, I get a CVI error "extcode.h"(442,16) Redeclaration of 'Point' and "extcode.h"(442,15) Redeclaration of 'Rect'. The extcode.h file on my system has never been modified and is attached.
0 Kudos
Message 1 of 2
(2,895 Views)
The Rect struct type defined in LabView's extcode.h is conflicting with another definition of Rect in another header file, which is most likely the LW/CVI userint.h header file needed to display UIs in a LW/CVI application.

If you don't use one or both of the Rect definitions in your code you can simply comment out the ones you don't need to avoid the conflict in this application.

If you do need to use both of them in the same application, then you won't be able to use both definitions in the same compilation units. In this case you will need to separate the code pieces that use the different definitions into different source files and compile them independently of one another and recombine their functionality at link time.

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