From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling error

I have realized an application with CVI5.5 and IMAQ VISION 6.0 under Windows98 and it work correctly. Now i have compiled the same project and the same library in a PC with Windows 2000. I have some link error (Inconsistent type declarations for external symbol '_struct_name' in modules 'file1.c' and 'file2.c') with struct that are defined in a header file. I have resolved the problem including my header file before including the file nivision.h .
Do you know why ?
0 Kudos
Message 1 of 2
(3,159 Views)
Hi Gualty,
There could be some slight differences in the struct between the windows 98 machine and the 2000 machine. This could be due to the fact that Windows 2000 was built on Windows NT technology. If the header files utilize the compiler directives #IFNDEF and #IFDEF, this may explain the strange behavior. With the nivision.h being processed first, it may correctly define the struct. Once the struct is defined, no other header file can redefine the struct. If the other header files correctly use the #IFDEF directive, they will detect that the struct has already been declared and will not try to redefine the struct. In summary if the struct is already correctly defined, it will not be incorrectly redefined.


Best Regards,
Aaron Kobayashi
Applications E
ngineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(3,159 Views)