MantisBT - GCC-XML
View Issue Details
0007370GCC-XMLpublic2008-07-20 01:362008-08-07 11:38
chi11ken 
Brad King 
normalfeaturealways
closedfixed 
0007370: Add OS X framework support to gcc-xml
As discussed on the mailing list (http://www.gccxml.org/pipermail/gccxml/2006-August/000827.html [^]),
gcc-xml doesn't currently support frameworks on Mac OS X. However,
due to the <framework>/<filename> format used on OS X, there's no easy
workaround using extra -I include directories. It appears that the
only solution at the moment is to symlink any required framework
headers into an include directory:

  ln -s /System/Library/Frameworks/Carbon.framework/Headers myIncludes/Carbon

However, this is quite a hack, and difficult to setup and maintain.
It would be great if gcc-xml could support frameworks out of the box.
No tags attached.
Issue History
2008-07-20 01:36chi11kenNew Issue
2008-07-20 08:49Brad KingNote Added: 0012757
2008-08-07 11:36Brad KingStatusnew => assigned
2008-08-07 11:36Brad KingAssigned To => Brad King
2008-08-07 11:38Brad KingStatusassigned => closed
2008-08-07 11:38Brad KingNote Added: 0012954
2008-08-07 11:38Brad KingResolutionopen => fixed

Notes
(0012757)
Brad King   
2008-07-20 08:49   
Since the discussion you mention the GCC parser inside gccxml has been bumped up to GCC 4.2 and does include the framework patch from Apple. The "-F" flag specifies the framework location for include directories, just like the native compiler. I just created a test file:

  // testGL.cxx
  #include <OpenGL/gl.h>

and ran

  gccxml -F /System/Library/Frameworks testGL.cxx

and it works.

The remaining issue is to get gccxml's automatic detection of the native compiler configuration to recognize framework paths as separate from system include paths. Meanwhile, you can work around the problem by specifying -F flags manually.
(0012954)
Brad King   
2008-08-07 11:38   
Fixed:

/cvsroot/GCC_XML/gccxml/GCC_XML/Support/GCC/find_flags,v <-- find_flags
new revision: 1.23; previous revision: 1.22

The system framework directories are now automatically detected and included in the configuration flags with -F. The previous example of including <OpenGL/gl.h> now works by running just

  gccxml testGL.cxx