I tried to compile a C++/CLI 64-bit .net application with OpenCV 2.1/2.2 and found out that by just doing simple stuff as below will cause internal compiler error.
Any workaround is appreciated. I need to eventually build a .net class library using OpenCV using C++/CLI. I have reconfigured OpenCV to be in 64-bit using CMake 2.8.
using namespace System;
int main(array<System::String ^> ^args)
The line "#include <opencv/cv.h>" will cause the compile error
Attached is the error log
1>------ Rebuild All started: Project: netcv, Configuration: Debug x64 ------
1> Generating Code...
1>c:\opencv-2.2.0\bin\include\opencv2\core\mat.hpp(379): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\wvm\mdmiscw.c', line 2704)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========