Has anybody gotten QuickGUI to work on OS X?


26-01-2008 04:06:22

I have it compiled as a framework but I'm running into issues when integrating it into my app. There seems to be some type conflicts between QuickGUI types and stuff in the Carbon framework. Here's what I'm getting.

/Users/me/Documents/Development/Framework-Sources/QuickGUI/build/Debug/QuickGUI.framework/Headers/QuickGUIPrerequisites.h:12: error: use of 'Rect' is ambiguous
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h:497: error: first declared as 'typedef struct Rect Rect' here
/Users/me/Documents/Development/Framework-Sources/ogrenew/Mac/build/Release/Ogre.framework/Headers/OgreCommon.h:343: error: also declared as 'typedef struct Ogre::TRect<long int> Ogre::Rect' here

Anyone have any ideas?


26-01-2008 08:37:16

Thats odd that there is an error, since the forward declaration of class Rect is within the QuickGUI namespace. The errors don't suggest there is another QuickGUI::Rect class, I don't see why there should be any sort of conflict regarding this. Maybe somebody else knows.. :?


26-01-2008 17:39:51

Ya, I thought it was strange too. I tried commenting out the forward declarations in Prerequisites.h and then I got the same complaint but from the actual QuickGUI::Rect class declaration.


26-01-2008 20:48:33

I think I ran into this very same issue when I was modifying the cmake build system to work on OS X. I can't remember how I fixed it though and unfortunately my mac box is broken at the moment.

If I can get it up and running sometime I'll look into it.


27-01-2008 02:48:40

Well, I found a workaround. As long as any QuickGUI header that you're including in a file is included before Carbon.h(and therefore MacTypes.h where Rect is defined) then it will compile. Should this go in the Wiki somewhere? BTW, I have a working project to build an embeddable Mac OS X Framework for QuickGUI if anyone wants it.


27-01-2008 06:17:16

Ah yeah I believe that's what I did as well. It might have something to do with OS X's ties to *BSD as I ran into similar issues building on FreeBSD.


27-01-2008 19:22:53

I have a working project to build an embeddable Mac OS X Framework for QuickGUI if anyone wants it.

Maybe we can add this to SVN? I'll send you a PM.