Why do I get "fatal error C1001: An internal error has occurred in the compiler" when using Microsoft Visual Studio C/C++ compiler?
조회 수: 2 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2020년 2월 7일
편집: MathWorks Support Team
2020년 11월 3일
When building my Simulink model using Microsoft Visual Studio 2017 C/C++ compiler, I get the following internal compiler error in the build log:
...\tunnelmodell_slrt_rtw\tunnelmodell.c(17912) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 256)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
cl!CloseTypeServerPDB()+0x757c1
cl!DllGetC2Telemetry()+0xe3ae8
cl!CloseTypeServerPDB()+0x7b1fc
cl!CloseTypeServerPDB()+0x73e8e
채택된 답변
MathWorks Support Team
2020년 11월 3일
편집: MathWorks Support Team
2020년 11월 3일
The error message indicates that this is a bug in Microsoft Visual Studio 2017 C/C++ compiler. One common cause are compiler optimizations applied to the code. See if setting the Code Generation > Compiler optimization level to Optimizations off (faster builds) in the model configuration parameters eliminates the error.
If this does not help, try to install the most recent version of Visual Studio 2017 C/C++ compiler, or use a different supported compiler (e.g. MinGW or other versions of Microsoft Visual Studio). To select the C/C++ compiler used by MATLAB, use the commands:
>> mex -setup c % set C compiler
>> mex -setup cpp % set C++ compiler
We encourage you to report the bug to Microsoft. To do this, open an account with the Visual Studio Developer Community and select "Report a problem". Attach full reproduction code to the report, so that Microsoft will be able to debug and fix the issue. Use the "Package code and artifacts" in our model parameters to get a ZIP archive of all source files, add the batch and make-files (model.bat, model.mk) and possible other dependencies (rtw_proj.tmw, model_comp.rsp) that may be required to run the model.bat file outside of the MATLAB environment.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Call C++ from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!