HI there,
I am using MATLAB coder to generate C++ code. Where can I set /MT (multithread) or /MD (multithread DLL)? Many thanks.

댓글 수: 2

Abhishek
Abhishek 2025년 6월 16일
편집: Abhishek 2025년 6월 16일
Hi @Theron FARRELL, You can set '/MT' or '/MD' in MATLAB Coder under Code Generation Settings then go to Toolchain, then to Custom Compiler Flags.
Theron FARRELL
Theron FARRELL 2026년 8월 3일 1:14
Sorry for a retarded reponse, but I fail to find Code Generation Settings. Instead, in Advanced->Additional Flags, I can add /MT, but it does not work. The generated .lib seems still to be /MD. I am using 2024a

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

답변 (2개)

Theron FARRELL
Theron FARRELL 2025년 6월 16일

0 개 추천

Cheers.
Is it here? If I choose C++, will I also need to add /MD in the row for C Compiler as well?

댓글 수: 2

Abhishek
Abhishek 2025년 6월 16일
Yes, you need to add '/MD' or '/MT' to both the C Compiler and C++. Did setting such flag work for you @Theron FARRELL ?
Theron FARRELL
Theron FARRELL 2026년 8월 3일 1:24
In 2024a, there is no C/C++ Compiler setting at all

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

카테고리

도움말 센터File Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품

릴리스

R2024a

태그

질문:

2025년 6월 10일

답변:

2026년 8월 3일 5:17

Community Treasure Hunt

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

Start Hunting!

Translated by