"Invalid file identifier" error while code generation

조회 수: 5 (최근 30일)
Anna Papasheva
Anna Papasheva 2020년 9월 8일
답변: Dhruv 2025년 6월 2일
I am using MATLAB 2019b and trying to generate a .dll file from a simulink model to integrate with Vector CANoe.
I also setted Microsoft Visual C++ 2019 as a c++ compiler.
I have chosen 'cn.tlc' in the code generation panel.
But when I am trying to generate code I am getting:
The call to cn_make_rtw_hook, during the after_tlc hook generated the following error: Invalid file identifier. Use fopen to generate a valid file identifier.
  댓글 수: 3
Anna Papasheva
Anna Papasheva 2020년 10월 9일
Hi,
I was trying to compile C++ but it is right to use C. I was able to do it successfully till today, but now I can not generate dll again. I don't have any errors but no dll either.
Martin Boehme
Martin Boehme 2022년 6월 23일
Same problem here!

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

답변 (1개)

Dhruv
Dhruv 2025년 6월 2일
Hi,
I see you're running into the "Invalid file identifier" error when trying to build a model using the cn.tlc system target file. From what I've seen, this error often happens when the target file is set using a relative path. A good workaround is to try using the full absolute path to the cn.tlc file instead.
Additionally, CANoe is a tool developed by Vector. For more in-depth help with this or other CANoe-related issues, I'd recommend reaching out to Vector's technical support here:
I hope this helps!

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by