Filter löschen
Filter löschen

reading mat files in C++

3 Ansichten (letzte 30 Tage)
John Knowles
John Knowles am 26 Jul. 2016
Bearbeitet: John Knowles am 27 Jul. 2016
I would like to compile a console application using the XCode 7.3 GUI. The application would read information from a mat file, and to test it I thought I would try the matlab example diagnose.cpp. It has previously been noted that compiling this outside of Matlab requires specifcation of the path to the libmat.dylib, which in my case is /Applications/MATLAB_R2015b.app/bin/maci64. However I could not find out how to specify this in the Xcode GUI. Any suggestions as to how to do this? I am trying to avoid using the matlab compiler as this results in very slow standalone programs.

Akzeptierte Antwort

Wayne Xun
Wayne Xun am 26 Jul. 2016
Hi John
I found a tutorial for XCode 7.2. This is a bit older than your version, but hopefully you'll still be able to follow it. TUTORIAL
Hope this helps
  1 Kommentar
John Knowles
John Knowles am 27 Jul. 2016
Bearbeitet: John Knowles am 27 Jul. 2016
Hi Wayne:
That really helped a lot for the mat functions. I never would have figured that out on my own. Now the strange thing is that I am getting errors for failing to link to what I think are mex API functions, even though, following the tutorial, I linked to the LibMex.dylib library also. I show these errors below. For instance mxDestroyArray is listed in the Mathworks page as a function in Matrix.h. I could not find it in there, but that file consists mainly of pre-processor commands, so it could be included from somewhere else.
Am i interpreting these errors correctly as due to a missing lib file? Is there an easy fix? many thanks,
John
Undefined symbols for architecture x86_64:
"_mxDestroyArray", referenced from:
diagnose(char const*) in Diagnose.o
"_mxFree", referenced from:
diagnose(char const*) in Diagnose.o
"_mxGetNumberOfDimensions_730", referenced from:
diagnose(char const*) in Diagnose.o
"_mxIsFromGlobalWS", referenced from:

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by