Error while compiling C code containing mex.h and mexFunction
3 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to compile a C code that uses mex.h file, but I am getting following error. The command that i have used to compile C code is this
gcc test.c
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/666185/image.png)
Basically I have a C program with "mex.h" and I am trying to compile this file and the aim is to be able to use compiled file independent of the Matlab on the system.
3 件のコメント
James Tursa
2021 年 6 月 28 日
All of those missing functions are contained in MATLAB libraries. You need to link with these libraries to resolve the function calls, and you need MATLAB installed to have those libraries available. If you don't have MATLAB installed, the alternative is to rewrite the C code so that it doesn't depend on those library functions.
回答 (1 件)
Swatantra Mahato
2021 年 6 月 29 日
編集済み: Swatantra Mahato
2021 年 6 月 29 日
Hi Rohan,
It is my understanding that you want to create a standalone application using mex functions. You can create the application using the MATLAB Compiler to compile a MATLAB function that calls your mex function
The documentation link below contains some tips on how to compile MATLAB functions containing mex files
Hope this helps
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Troubleshooting in MATLAB Compiler SDK についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!