Getting linking error:2001 while integrating C-code generated from Real time work shop from a simulink block.
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hi,
I am Prem K. Mishra.I have converted one simulink block(designed to calculate displacement over time)into C-code using real time work shop.I am trying to implement the generated C-code into a program written in Micrsoft Visual C++ 6.0. While compiling I am getting linking errors like:
c2_status.obj : error LNK2001: unresolved external symbol _sf_mex_addfield
status_sfun.obj : error LNK2001: unresolved external symbol _mxGetScalar
status_sfun_registry.obj : error LNK2001: unresolved external symbol _mxGetM.
I have added the required .lib files in the additional libraries lists.
Can you please suggest something.If I am missing any .lib files.
Thanks in advance.
Thanks & Regards, Prem
댓글 수: 0
답변 (1개)
Kaustubha Govind
2012년 1월 31일
0 개 추천
You need to use either grt.tlc or ert.tlc as the System Target File for your model. The code that is generated for your model seems to include calls to functions like mxGetScalar and mxGetM which belong to the MATLAB MEX API, and cannot be executed outside of MATLAB. So it seems likely that you are not using the correct process to generate standalone C code.
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!