Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
X-code C++ tool #include <mex.h>

Subject: X-code C++ tool #include <mex.h>

From: sara

Date: 21 Jan, 2009 21:09:02

Message: 1 of 5

Hello,

I am using the Xcode application to compile a C++ code which reads in Matlab files, such as .mat file. Hence I need to include the mex.h header into the C++ code. But the compiler can't find the mex.h loacation, eventhough I added its location to the header search path.

I am wondering if anyone had this situation before, and could help me set this up.

Thanks a lot,
sara

Subject: X-code C++ tool #include <mex.h>

From: James Tursa

Date: 22 Jan, 2009 05:39:01

Message: 2 of 5

"sara " <ssalha@ucla.edu> wrote in message <gl82te$ngf$1@fred.mathworks.com>...
> Hello,
>
> I am using the Xcode application to compile a C++ code which reads in Matlab files, such as .mat file. Hence I need to include the mex.h header into the C++ code. But the compiler can't find the mex.h loacation, eventhough I added its location to the header search path.
>
> I am wondering if anyone had this situation before, and could help me set this up.
>
> Thanks a lot,
> sara

Try

#include "mex.h"

James Tursa

Subject: X-code C++ tool #include <mex.h>

From: sara

Date: 22 Jan, 2009 05:53:02

Message: 3 of 5

I did try that early on, as the " " for user defined header, and the <> for the system header (recent discovery). But that still didn't work...some deep linking complicated scenario, so it seems.

"James Tursa" <aclassyguywithaknotac@hotmail.com> wrote in message <gl90pl$85r$1@fred.mathworks.com>...
> "sara " <ssalha@ucla.edu> wrote in message <gl82te$ngf$1@fred.mathworks.com>...
> > Hello,
> >
> > I am using the Xcode application to compile a C++ code which reads in Matlab files, such as .mat file. Hence I need to include the mex.h header into the C++ code. But the compiler can't find the mex.h loacation, eventhough I added its location to the header search path.
> >
> > I am wondering if anyone had this situation before, and could help me set this up.
> >
> > Thanks a lot,
> > sara
>
> Try
>
> #include "mex.h"
>
> James Tursa

Subject: X-code C++ tool #include <mex.h>

From: Adi

Date: 20 Jul, 2011 15:47:09

Message: 4 of 5

Hi,

I'm having the same problem too. Have you managed to resolve it?

"sara " <ssalha@ucla.edu> wrote in message <gl91ju$hq$1@fred.mathworks.com>...
> I did try that early on, as the " " for user defined header, and the <> for the system header (recent discovery). But that still didn't work...some deep linking complicated scenario, so it seems.
>
> "James Tursa" <aclassyguywithaknotac@hotmail.com> wrote in message <gl90pl$85r$1@fred.mathworks.com>...
> > "sara " <ssalha@ucla.edu> wrote in message <gl82te$ngf$1@fred.mathworks.com>...
> > > Hello,
> > >
> > > I am using the Xcode application to compile a C++ code which reads in Matlab files, such as .mat file. Hence I need to include the mex.h header into the C++ code. But the compiler can't find the mex.h loacation, eventhough I added its location to the header search path.
> > >
> > > I am wondering if anyone had this situation before, and could help me set this up.
> > >
> > > Thanks a lot,
> > > sara
> >
> > Try
> >
> > #include "mex.h"
> >
> > James Tursa

Subject: X-code C++ tool #include <mex.h>

From: Chirag Gupta

Date: 20 Jul, 2011 17:49:09

Message: 5 of 5

You need to add the MATLAB header search paths:

in Xcode: Go to Project->Edit Project Settings.

Then open the Build Tab and search for Header Search Paths. Add the MATLAB directory to the path. Its typically: /Applications/MATLAB_$YOURVERSION$.app/extern/include


These are the settings for XCode3, XCode 4 settings are similar!






"Adi" wrote in message <j06t9t$f8b$1@newscl01ah.mathworks.com>...
> Hi,
>
> I'm having the same problem too. Have you managed to resolve it?
>
> "sara " <ssalha@ucla.edu> wrote in message <gl91ju$hq$1@fred.mathworks.com>...
> > I did try that early on, as the " " for user defined header, and the <> for the system header (recent discovery). But that still didn't work...some deep linking complicated scenario, so it seems.
> >
> > "James Tursa" <aclassyguywithaknotac@hotmail.com> wrote in message <gl90pl$85r$1@fred.mathworks.com>...
> > > "sara " <ssalha@ucla.edu> wrote in message <gl82te$ngf$1@fred.mathworks.com>...
> > > > Hello,
> > > >
> > > > I am using the Xcode application to compile a C++ code which reads in Matlab files, such as .mat file. Hence I need to include the mex.h header into the C++ code. But the compiler can't find the mex.h loacation, eventhough I added its location to the header search path.
> > > >
> > > > I am wondering if anyone had this situation before, and could help me set this up.
> > > >
> > > > Thanks a lot,
> > > > sara
> > >
> > > Try
> > >
> > > #include "mex.h"
> > >
> > > James Tursa

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us