title: OS X from Carbon to Cocoa window creation?
body: <p><strong>Edit: This question has been answered indirectly in the comments (using GLUT to avoid the need for either) but because its not posted as an answer, I cannot "accept" it although my issue is solved.</strong></p>
  
  <p>I have a cross platform OpenGL application, written in C++, that (on Mac OS X) uses Carbon for the window creation and message pump (Think...NeHe Lesson 1).  Recent changes to my code utilizing C++11 features has made it incompatible with the GCC that comes bundled with XCode.</p>
  
  <p>All of my attempts to use systems like MacPorts, HomeBrew, etc... have failed for different reasons (Mostly due to my need to compile 32bit for Carbon support).  I was originally going to ask if anyone had a better solution for installing an updated G++ in Mac OS X 10.8.</p>
  
  <p>That seems like a short sighted solution (at some point, I will need to upgrade to Cocoa and 64bit) so my question has evolved to asking what would be the most simple way to have my existing (very large) application utilize Cocoa for this task rather than Carbon?</p>
  
  <p>I have all of the "Carbon Code" in its own separate .cpp/.h file, which has only two functions, one to create an OpenGL window, and one that is a message pump that uses ReceiveNextEvent.</p>
  
  <hr>
  
  <p><strong>Edit:</strong>
  To be clearer, I am looking for the best way to design (more or less) a drop in replacement for my existing Carbon window creation, and message pump functions, but in Cocoa.  I understand that being a different API, using different language concepts, that a simple one to one command replacement will not suffice.  My existing code has a source code file for Mac that has two functions which perform core tasks (with Carbon) that I call, InitWindow, and DoEvents.  These create the window, and cycle through the pending events respectively.  It is my goal to replace this source code file with one that uses Cocoa, exposing the same functions so there is little to no modification of my core code.</p>
  
  <p>What would be the best way to achieve my goal?  I am not familiar with Cocoa and Obj-C is alien to me. </p>