LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 7.0 getting a compiler error while including mil.h a matrox orion imaging

CVI 7.0 getting a compiler error while including mil.h a matrox orion imaging card the version is mil-lite 7.5
from matrox
0 Kudos
Message 1 of 8
(4,390 Views)
What is the compile error ?

If it is a redefinition error, then it maybe easy to fix by re-ordering your include files.

Of find the offending #define and doing the following:

#ifndef SOME_DEFINE
#define SOME_DEFINE
#endif

This stops it from being defined multiple times.
You try to avoid that since it can mean making changes to supplied header files, which is ok, until the next time you get an updated include file, which then breaks your compile again.

If the mil.h file is included say after a windows file, and both contain the #define, the windows file usually have some protection like I showed above.
Just moving the order in which the header file is placed can often get rid of these errors

If this does not help you, post the actual error you are see
ing and I'll see if I can help out any more


Regards

Chris
0 Kudos
Message 2 of 8
(4,389 Views)
hi Chris

regarding the compiler error with mil.h in cvi 7.0

1. I have tryed to change the include file order->no luck.
2. the compiler error is in the file milproto.h,
(mil.h include this file atomaticly) & the error
says as follows:
"syntax error found identifier expecting ;"
MFTYPE32 MIL_ID .....
the cursor stays on the MIL_ID which mean that the
MFTYPE32 define is not complete.After furthur
investigation the mil files are builed for visual C++ or borland so there is conflict with CVI in some of the defs.

Regards
Gabel Daniel
chaban@netvision.net.il
0 Kudos
Message 3 of 8
(4,389 Views)
Gabel,

Try looking in some of your header and source files, in the order in which they are compiled for a typo.

Sometimes missing a > ; < off the end of a line will be cause that error.

Most likely it is within a header file,

first check the definition of MFTYPE32 MIL_ID .....

and then check the definition before it.

Then check where it is created.

For example, in your source file you may have

int a;

char s;

MIL_ID myCopyOfThis Type

double d;

Because I left the ; off the MIL_ID it will cause the macro / define for that type to include the double d; as part of its declaration. This sometimes leads to the error that you have recieved.

Attach the header file to your next message if you can't find it.

I am moving ba
ck to the UK tomorrow, so this maybe my last post for a few days.

I hope you get sorted, if not, I'll check back next week.

Regards

Chris
0 Kudos
Message 4 of 8
(4,389 Views)
Hi Chris

I found the solution to the compiler problem
As i mantion erlier the mil lib was wrriten for visual C++ or borland so i put the foollowin statment in my project defines & all is solved:
/D_MSC_VER=1200
0 Kudos
Message 5 of 8
(4,390 Views)
Glad you are sorted...
0 Kudos
Message 6 of 8
(4,389 Views)
How exactly did you do this??
Thanks,
 
Deasun
0 Kudos
Message 7 of 8
(4,281 Views)

Don't panic.

Found it.

 

Deasun

0 Kudos
Message 8 of 8
(4,276 Views)