필터 지우기
필터 지우기

Build error: C compiler produced errors. See the Build Log for further details.

조회 수: 18 (최근 30일)
Dominik Müller
Dominik Müller 2020년 11월 10일
답변: Sukrut Tamhankar 2020년 11월 19일
Hi folks,
I'm currently trying to export a mex-file with Matlab Coder. If I check my code for issues everything is okay. But if I try to generate the mex-file the following error occurs:
The build log gives the following message:
error: unknown type name 'struct0_T'
I don't know why and have no solution on this.
The build log also writes the following:
FAILED: build/win64/simcycle_ext_terminate.o
There are lots of errors like this. It seems there is a problem generating these .o-files?
Maybe someone got an idea on solving this?
  댓글 수: 2
Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020년 11월 10일
Can you please explain your workflow in little bit more detail ? What do you mean by "trying to export a mex-file" ?
Also if possible please attach a sample script along with the commands to reproduce this issue.
Dominik Müller
Dominik Müller 2020년 11월 11일
I have an idea what causes the issue: I tried to use a handle object as input for my function and this is not supported.

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

답변 (1개)

Sukrut Tamhankar
Sukrut Tamhankar 2020년 11월 19일
The error "unknown type name" occurs sometimes in the compilation for some of the structures or enumerations. If these are properly defined and used but not appearing in the code, it results in this error message while compiling.
A possible workaround in this case would be to collect the names of all the structures/enums that are erroring out as unknown type name/missing and define them in a header file, in the same way as we would expect them to appear in "Rte_Type.h" and then include this file in the "Code Generation >> Custom Code" section in the Model Configuration Parameters, something like this:
# ifndef NAME_OF_STRUCT
# define NAME_OF_STRUCT
# endif

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by