"Invalid file identifier" error while code generation

3 次查看(过去 30 天)
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.

请先登录,再进行评论。

回答(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