QT Creator autocomplete for structs and functions from OS X headers
I'm using Qt Creator 3.3 to develop my Qt based applications on OS X Yosemite. Syntax highlighting and autocompletion works well for std c++ an Qt but not for structs and functions from OS X headers.
It look like that Qt Creator can't find these headers. I.e. the statement #include <CoreAudio/CoreAudio.h> is underlined (means not found). Compiling and linking works fine (Framework is included in project file: LIBS += -framework CoreAudio). Is there any way to tell Qt Creator how to find OS X headers?
Thanks for help
after a long search I found an unsatisfactory solution.
The directories in which the headers of the SDK lie have a peculiar structure. It's a mystery for me that the compiler find these header files.
I've written a small php shell script. It creates a directory with symbolic links to all header directorys of the SDK frameworks.
$sdk = "MacOSX10.10.sdk";
$sdk_dir = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/".$sdk."/System/Library/Frameworks/";
$out_dir = "~/include_".$sdk;
$d = dir($sdk_dir);
while( FALSE !== ($f = $d->read()) )
if( !is_dir($sdk_dir.$f) )
if( ".framework" != substr($f,-strlen(".framework")))
if( is_dir($sdk_dir.$f."/Headers") )
symlink( $sdk_dir.$f."/Headers", $out_dir."/".substr($f,0,-strlen(".framework")));
In my .pro file I add this directory to the INCLUDEPATH variable.
In this way Qt-Creator finds what it needs!
The disadvantage is. The compiler is disturbed by this INCLUDEPATH, so I always have to remove this entry before compiling.
Maybe someone knows a better solution?