"Invalid file identifier" error while code generation

7 Ansichten (letzte 30 Tage)
Anna Papasheva
Anna Papasheva am 8 Sep. 2020
Beantwortet: Dhruv am 2 Jun. 2025
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 Kommentare
Anna Papasheva
Anna Papasheva am 9 Okt. 2020
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 am 23 Jun. 2022
Same problem here!

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Dhruv
Dhruv am 2 Jun. 2025
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!

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by