OpenGL GLUT Application Template

Filed under Apple + Programming + Tutorials + xcode on Thursday, 21 August, 2008 2:15 am

Here is a downloadable template to create an OpenGL GLUT Application (using an app bundle) for the people who haven’t figured out how to use Xcode 100% as yet.

There area Xcode templates freely available for SDL OpenGL projects but not for GLUT so I’m providing this one myself. I think I found this on a MacRumors thread so I cannot take credit for this but anyway, enjoy.

48AAFD8E-1EDA-4522-A24E-F1A50746E5D4.jpg

Brock

Linking Errors with C++ in Xcode

Filed under Programming on Tuesday, 5 August, 2008 1:57 am

If you’re programming C++ classes and happen to get a linking error similar to this:

ld: symbol(s) not found
collect2: ld returned 1 exit status
“RTSUserInterface::UserInterface::UserInterface()”, referenced from:
RTSnamespace::MainMenu::MainMenu()in mainMenu.o
RTSnamespace::MainMenu::MainMenu()in mainMenu.o
“RTSUserInterface::UserInterface::~UserInterface()”, referenced from:
RTSnamespace::MainMenu::MainMenu()in mainMenu.o
RTSnamespace::MainMenu::MainMenu()in mainMenu.o
RTSnamespace::MainMenu::~MainMenu()in mainMenu.o
RTSnamespace::MainMenu::~MainMenu()in mainMenu.o
RTSnamespace::MainMenu::~MainMenu()in mainMenu.o
RTSnamespace::MainMenu::~MainMenu()in mainMenu.o
RTSnamespace::MainMenu::~MainMenu()in mainMenu.o
RTSnamespace::MainMenu::~MainMenu()in mainMenu.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (2 errors)

The problem is that you haven’t written the body for your class constructors and destructors in your implemenation (.cpp) file. I consider this a reminder.

How to Add (Java) Packages to Xcode

Filed under Apple + Programming on Wednesday, 18 April, 2007 12:53 pm

xcodejava

I have started writing Java programs at uni and i’m required to add a Java package called B102.jar to the compiler.
Well, the university doesn’t support anyting other than Windows so it was a pain trying to figure out how to use Xcode and use their ‘B102.jar’ package. Anyway to add a .jar package to Xcode for compilation, all you need to do is add your .jar package to:

/System/Library/Java/Extensions/

That’s it. Now when you type import B102.*; for example, it will compile correctly.