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

New to MATLAB?

Thread Subject:
xcode 4.4 cannot see mex.h

Subject: xcode 4.4 cannot see mex.h

From: John

Date: 11 Aug, 2012 16:27:07

Message: 1 of 2

The build command results in mex.h file not found.
In the header search paths (debug and release, any OSX) I have the standard path:
(i also tried without the final /)
mex.h is indeed present.

I can make this go away by dragging mex.h into the project, but then I have the same problem with files included by mex.h. I also tried putting the directory in the public headers folder path.

I thought it might be the wrong SDKROOT but this variable is not present in

How to include mex.h?


Subject: xcode 4.4 cannot see mex.h

From: John

Date: 12 Aug, 2012 12:22:06

Message: 2 of 2

Follow up from thread originator

The answer I found by trial and error was to put the path into USER_HEADER_SEARCH_PATHS. Why wasnt this obvious to me? Because there seem to be many fields which would seem plausible locations for this path.
If I click on the project for instance, I get one set of fields, and if I click on the target, another set. Why doesn't the target inherit all the project settings? Which is the correct one for the mex file path?
Second, even if we stick to either project or target, there are still many header paths:
under search paths, we first see
Under packaging, we also see
Probably there is a nice web page somewhere explaining how to use each of these fields, and whether/when to click the little boxes that appear beside each path entry. If someone out there knows of such page, please let me know.

Tags for 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