How to build C S function using C code from the Matlab coder?

I have successfully generated C-code using the Matlab coder, from a Matlab source code. The Matlab code was being used in a Simulink simulation enviroment. This is quite slow, particularly to run a Monte-Carlo sequence for example so I wanted to replace the Matlab code with C-code or C++ code to expedite the simulations. Each time I try to build the mex file for the C S-function, I get the following error:
Error using mex Cannot export mexFunction: symbol not defined collect2.exe: error: ld returned 1 exit status
Error in mex_SensorFusion (line 3) mex -v SensorFusion_VersionC_6_ForCodeGen_CCode.c power.c sort1.c eye.c inv.c sortIdx.c rtGetInf.c rtGetNaN.c rt_nonfinite.c SensorFusion_VersionC_6_ForCodeGen_CCode_terminate.c SensorFusion_VersionC_6_ForCodeGen_CCode_initialize.c
I am obviously missing something in this build sequence but I am not certain what. Thanks!

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

質問済み:

2016 年 7 月 12 日

編集済み:

2016 年 7 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by