필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Convert Mathlab to c/c++ convert issue

조회 수: 1 (최근 30일)
jayesh
jayesh 2014년 4월 8일
마감: MATLAB Answer Bot 2021년 8월 20일
I have installed matlab version 2012b(full installation) and Microsoft Windows SDK 7.1 in my PC. I have set compiler using this "mbuild" command (set successfully). After I try to convert very simple matlab code to c/c++ code. But I am getting following error like screenshot
Any one can please help me? Thanks in advance

답변 (2개)

Piet
Piet 2014년 4월 8일
편집: Piet 2014년 4월 8일
I think it is because a and b are undefined. Usually you call it like for example sum_of_two_numbers(4,7). Just like the C code:
int sum;
int ss2n(int a, int b)
{
sum = a + b;
return sum;
}
When you call the function you supply the values of a and b, compute the result and put it in sum and return that.

Ryan Livingston
Ryan Livingston 2014년 4월 8일
편집: Ryan Livingston 2014년 4월 8일
Can you try:
mex -setup
rather than mbuild? The command mbuild is for MATLAB Compiler rather than MATLAB Coder.

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by