Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

nimachinevision.h & nivision.h seem not to work with ATL!

Hi folks! 😉
I'm trying to build up my first DCOM ATL Server with IMAQ Vision.
Many methods of the VisionEngine object (that interfaces IMAQ APIs) use, as parameters, types that are defined in nivision.h & nimachinevision.h, so I put the following line at the beginning of my IDL file:
 
import "nimachinevision.h";
 
and compiled.
First time I got a redefinition of _matherr in math.h (???) that was included by nimachinevision.h
I tried to comment out that statement (#include <math.h>), and I got about 125 errors, all saying "redefinition". The redefinition are about the 90% of the types defined in nivision.h.
 
I see that in nivision.h there are forward declaration of structures declared below in the file. I'm sure that there forward declarations make something wrong with MIDL compiler (same headers included in a MFC project I used to develop & test a driver worked well!).
 
What I have to do?
 
Thanks in advance,
Morenz.
0 Kudos
Message 1 of 1
(3,237 Views)