Project Preparation Failed Error while generating Code

조회 수: 22 (최근 30일)
Peter Bauman
Peter Bauman 2022년 11월 22일
댓글: Peter Bauman 2023년 1월 25일
I am creating a Simulink model for TwinCAT and while generating the code I always run into an error, namly:
The call to TwinCatGrt_make_rtw_hook, during the after_make hook generated the following error:
Project preparation failed
The build process will terminate as a result.
Caused by:
  • Project preparation failed
I searched the internet for an answer but can't seem to find any. I also tried creating a completely empty model and just doing a simple addition and I get the same error. The TwinCAT libraries should all be installed and the matlab libraries aswell.
Does anybody know how to solve the error?

채택된 답변

Peter Bauman
Peter Bauman 2022년 12월 15일
solved by adding the license to the computer
  댓글 수: 2
Tony
Tony 2022년 12월 26일
편집: Tony 2022년 12월 26일
Could you explain in details how to fix the problem pls?
Peter Bauman
Peter Bauman 2023년 1월 25일
Sorry for the long wait, I actually got the problem again and finally solved it again. It depends why the preparation failed. In my case it wasn't finding the compiler:
I then found out that my TwinCAT 3 was not linked to VisualStudio anymore and thus could not find the compiler, To make sure this is the case check this:
If the VS 2019 is missing you have to deinstall TwinCAT 3 and then install it again making sure the Visual Studio box is ticked during the installation.
This should solve the issue. I hope I could help

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by