From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

fatal error C1001: INTERNAL COMPILER ERROR

I am using IMAQ Vision 5.0 with Visual Studio .NET.
 
I added the paths that usually work for me:
 
     Project Properties/ C/C++ /General/Additional Include Directories:
          C:\Program Files\National Instruments\IMAQ Vision\include
     Project Properties/Linker/General/Additional Library Directories:
          C:\Program Files\National Instruments\IMAQ Vision\lib\msvc
     Project Properties/Linker/Input:
          nivision.lib
 
When I #include "nivision.h", I get the following compile error message:
fatal error C1001: INTERNAL COMPILER ERROR     (compiler file 'msc1.cpp', line 2708)     Please choose the Technical Support Command on the Visual C++ Help menu, or open the Technical Support help file for more information
 
When I remove the #include "nivision.h", it compiles without error...
 
Thank you in advance,
Sébastien
0 Kudos
Message 1 of 5
(5,128 Views)
Hi Sebastien,

If you do not #inlcude the nivision.h file, is your code functional?  Also, what version of VB.NET are you using?

Wes P
Applications Engineer
National Instruments
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 2 of 5
(5,084 Views)

Hello Wes,

Thank you for your reply. If I did not #include "nivision.h", it did compile because I hadn't added any IMAQ functions in the code. I use Microsoft Development Environment 2003 version 7.1.6030.

After playing around with the location of the #include's, I could pinpoint the problem more acurately: I have a class of my own that is named "Complex". I discovered that it interferes with the structure Complex_struct. As a workaround, I modified the nivision.h file, at line 787 and 1163. I replaced the structure name "Complex" with "ComplexNI":

(...)

typedef

struct Complex_struct {

float r;

float i;

} ComplexNI; //     } Complex;    Line 787

(...)

typedef

union PixelValue_union {

float grayscale;

RGBValue rgb;

HSLValue hsl;

ComplexNI complex; // Complex complex;    Line 1163

} PixelValue;

 

Until now, it works. Is it only because the functions I call do not use the Complex_struct? Am I running into trouble?

Thank you,

Sébastien Gilbert, Image Analysis Algorithm Developer, IBM Canada

0 Kudos
Message 3 of 5
(5,073 Views)
Hi Sebastien,

Thanks for the information.  Going back to your originial post, I have a few more questions.  First of all, Vision 5.0 is an older product, out three years prior to VS.NET.  You said that you added paths that usually work for you.  Have you been able to run Vision  5.0 and VS.NET 2003 together in the past?  Or is that what has worked in the past with other compilers?  If you have been able to compile using Vision and VS.NET before, something had to change.  Do you know of any recent software changes on your computer?  It is possible that a compiler file has been corrupted.  If that is the case, uninstalling and reinstalling Vision would solve the problem.  I hope this helps!


Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 4 of 5
(5,067 Views)

Hello Wes,

Yes, I have been able to use Vision 5.0 with VS.Net 2003 in the past. The reason why it wouldn't compile is the introduction of this user-defined class "Complex" in a project, together with Vision 5.0.   I managed to make them work together by slightly editing the file "nivision.h" (cf. my previous message). Does this change puts me at risk of other problems?

Sébastien

0 Kudos
Message 5 of 5
(5,063 Views)