How to compile from a linux command line matreadstructarray.c using gcc?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Darshan Ramakant Bhat
le 17 Jan 2018
I found the similar issue being discussed in the below MATLAB answer post:
I hope this will help you.
0 commentaires
Voir également
Catégories
En savoir plus sur Application Deployment dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!