I am an amateur mac user and I’m trying to make a c++ project in Xcode. Everywhere I go I am told to make a Command Line tool project in Xcode.
This is frustrating because I intend to make an OpenGL app and so I don’t want it to be a console app.
This may be a very amateur question but I’m not familiar with Mac’s. How can I make a non-console (terminal), C++ app in Xcode that I can make my OpenGL application in?
EDIT: Could I use SDL for windowing rather than cocoa?
You’ll have to make a Cocoa application, and change the extensions of your files from
.mto.mm. This tells the compiler you will also be using C++ with Objective-C.The way Mac handles windowing pretty much requires the use of Objective-C, so you need the base Cocoa to make the window and the GL view, and then you will be able to write the rest in C++ as you would normally.
If you really want to be entirely C++, you could use a framework like GLUT that handles windowing itself.