How to compile from a linux command line matreadstructarray.c using gcc?
4 ビュー (過去 30 日間)
古いコメントを表示
I'd like to compile from the command line one of the sample files, but I receive the following error when I do so. (I copied matreadstructarray.c' to my 'c' folder). Any help would be appreciated. Thanks.
<179 pebble2:~/c > *gcc -o a.out matreadstructarray.c -I "/soft/linux/matlab2017b/extern/include"*
/tmp/ccjtgFoj.o: In function `analyzestructarray':
matreadstructarray.c:(.text+0x21): undefined reference to `mxGetNumberOfElements'
matreadstructarray.c:(.text+0x46): undefined reference to `mxGetField'
matreadstructarray.c:(.text+0x5d): undefined reference to `mxGetClassID'
matreadstructarray.c:(.text+0x6e): undefined reference to `mxIsComplex'
matreadstructarray.c:(.text+0x7e): undefined reference to `mxGetPr'
/tmp/ccjtgFoj.o: In function `findstructure':
matreadstructarray.c:(.text+0xf5): undefined reference to `matOpen'
matreadstructarray.c:(.text+0x133): undefined reference to `matGetVariable'
matreadstructarray.c:(.text+0x16a): undefined reference to `mxGetClassID'
matreadstructarray.c:(.text+0x182): undefined reference to `mxGetFieldNumber'
matreadstructarray.c:(.text+0x1d6): undefined reference to `mxDestroyArray'
matreadstructarray.c:(.text+0x1e2): undefined reference to `matClose'
collect2: error: ld returned 1 exit status
<180 pebble2:~/c >
0 件のコメント
回答 (1 件)
Darshan Ramakant Bhat
2018 年 1 月 17 日
I found the similar issue being discussed in the below MATLAB answer post:
I hope this will help you.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!