Compiling Lugaru on OSX

The place to discuss all things Lugaru.
L0CKnL0aD7
Posts: 8
Joined: Mon Mar 14, 2011 12:59 pm

Compiling Lugaru on OSX

Post by L0CKnL0aD7 » Tue Mar 15, 2011 8:19 am

I'm having issues compiling Lugaru's Source code with XCode...
Does anyone have a fixed version for XCode ,preferably for XCode 4 tho 3.2.5 would be fine.
THX

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Tue Mar 15, 2011 2:09 pm

http://code.google.com/p/lugaru/ should work just fine.

L0CKnL0aD7
Posts: 8
Joined: Mon Mar 14, 2011 12:59 pm

Re: Compiling Lugaru on OSX

Post by L0CKnL0aD7 » Tue Mar 15, 2011 6:32 pm

This Source doesn't Contain an XCode project!?
btw: already tried the svn & git & mercurial sources to...

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Wed Mar 16, 2011 3:56 pm

L0CKnL0aD7 wrote:This Source doesn't Contain an XCode project!?
btw: already tried the svn & git & mercurial sources to...
It does! http://code.google.com/p/lugaru/source/ ... ct.pbxproj
You need to check the code out, get Mercurial and follow the instructions here: http://code.google.com/p/lugaru/source/checkout
You can then find the pbxproj in Xcode/Lugaru.xcodeproj/ (as you'd expect, going by http://code.google.com/p/lugaru/source/ ... .xcodeproj).

It seems it doesn't build properly at the moment from within Xcode 4, I'll have a look for a couple of minutes.

L0CKnL0aD7
Posts: 8
Joined: Mon Mar 14, 2011 12:59 pm

Re: Compiling Lugaru on OSX

Post by L0CKnL0aD7 » Wed Mar 16, 2011 4:36 pm

This gives the same problem as the previous sources I tried...
XCode complains about missing files!
I attached a screenshot. Am I doing something wrong?

I used The terminal to get the source:
"hg clone https://lugaru.googlecode.com/hg/ lugaru" inside the directory I wanted i to be
then I just opened the xcode file and tried to build...
Attachments
XCode 3.2.5.png

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Wed Mar 16, 2011 5:08 pm

Do you have the OpenGL framework added as a framework in the project? Is it even on the system?

It should ordinarily have been added during the Xcode installation process.

The project should actually have the framework added already.

Edit: To clarify, the OpenGL framework is part of the OS X 10.6 SDK.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Wed Mar 16, 2011 5:15 pm

Lugaru uses the following OS X 10.6 frameworks:
— Carbon
— Cocoa
— IOKit
— OpenAL
— OpenGL
— CoreFoundation

And it comes with SDL on top of that.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Wed Mar 16, 2011 6:23 pm

I've cloned the repository to address the linking issues in Xcode. Lugaru now compiles and runs as intended from within Xcode 4. You can access the clone here: http://code.google.com/r/wolfmathwig-xcode4fixes/
I've posted an issue to the original repository so that the guys merge these changes eventually. I'll also post on icculus' mailing list momentarily so that he knows about the fixes.

L0CKnL0aD7
Posts: 8
Joined: Mon Mar 14, 2011 12:59 pm

Re: Compiling Lugaru on OSX

Post by L0CKnL0aD7 » Thu Mar 17, 2011 6:48 am

This Source has a lot less Issues for me however doesn't work yet...
Do I have to manually add some files / frameworks ?

ERROR'S:
XCode 4.png
I fixed the SDL by adding the required header files in the sources folder,
how do I have to fix the GL?

btw why aren't there any header files in the project?

L0CKnL0aD7
Posts: 8
Joined: Mon Mar 14, 2011 12:59 pm

Re: Compiling Lugaru on OSX

Post by L0CKnL0aD7 » Thu Mar 17, 2011 7:21 am

It doesn't seem too use the Dependencies...
How can I make this work without having to move every file & edit the code?

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Thu Mar 17, 2011 7:42 am

Again, it seems like you haven't installed the OS X SDK properly. In a sane environment, once you clone the repository, this compiles and runs as-is, without you adding a thing or fiddling around. The errors indicate it can't find headers that should have been installed alongside Xcode.
You might want to consider reinstalling Xcode and paying close attention to the installation process.

Also, note that your code doesn't belong into /Developer/. That's where libraries and stuff belong, you shouldn't have to ever touch that folder. Your code belongs into your home directory.

You can check of course whether you have the OpenGL framework on the system, for example. If it is installed, then you can find it in /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks

L0CKnL0aD7
Posts: 8
Joined: Mon Mar 14, 2011 12:59 pm

Re: Compiling Lugaru on OSX

Post by L0CKnL0aD7 » Thu Mar 17, 2011 8:02 am

Very strange all the files are in place...
I have the OSX 10.6 / 10.5 / 10.4 SDK's all installed.
I'll try to reinstall XCode.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Thu Mar 17, 2011 10:06 am

Well, if the files are in place, it should find the frameworks just fine. I'm not sure what goes wrong then.

Can you check the attached picture to see if the linking is set up right? (You're using Xcode 4, right?)
Attachments
Bildschirmfoto 2011-03-17 um 16.05.01.png

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Compiling Lugaru on OSX

Post by rudel_ic » Thu Mar 17, 2011 10:09 am

Also, check whether this setting is correct (click attached pic), specifically the Base SDK setting.
Attachments
Bildschirmfoto 2011-03-17 um 16.07.54.png

L0CKnL0aD7
Posts: 8
Joined: Mon Mar 14, 2011 12:59 pm

Re: Compiling Lugaru on OSX

Post by L0CKnL0aD7 » Mon Mar 21, 2011 5:13 am

I reinstalled XCode but it still doesn't seem to work, however I tried it on a friend's computer and it compiled just fine! (XCode 3)
All the settings are correct and the files are present.
I'm using the Developer Preview however,
This installs XCode 4 in "/XCode 4", so I still have XCode 3 available on my computer in my "/Developer" folder.
Does this cause the problem? And if so any way to fix it?

Post Reply