compiling linux apps to run on mac

Joined
Jan 14, 2007
Messages
101
Reaction score
5
Points
18
Your Mac's Specs
1.67ghz powerbook G4, 1GB RAM, 100GB HD.
I downloaded a linux app today (http://galaxyhack.sourceforge.net/download.php)
with the source code. I'm under the impression that I can compile it under mac OSX 10.4.8 and then run it.

How do I go about this? I took a look in Xcode, but I didnt know what sort of project I should choose (command line C++? Cocoa ?). All I need to do is compile the code.

Thanks :)
 
Joined
Jun 6, 2006
Messages
1,153
Reaction score
94
Points
48
Your Mac's Specs
MacBook 2.0GHz White, 512MB RAM, 60GB HDD
Looking at it, you should just go into the galaxyhack/src directory in Terminal and type 'make'. Of course, this depends on having all the libraries listed on the requirements page installed somewhere it can find then, which could be more problematic. I used Fink to get them.

In general, building stuff in XCode is very different from building linux apps the traditional linux way. Linux, BSD and the other free unixes don't have the same package and library structure as OS X so, while it is possible to create the project to build in XCode, it requires you to understand SDL for OS X's packaging.
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Although I haven't built GalaxyHack, I have built a number of linux apps successfuly on my Mac. First of all, make sure you have GNU C++ installed (it is available on your Mac OS X Install DVDs). This will give you the full tool chain and many libraries needed to do this sort of thing. Next, make sure you install Apple X11 (also available on same DVDs). This gives you the graphics environment.

With this in place, you should just be able to do the usual [./configure, make, make install] routine.

The fly in the ointment will be if it depends on libraries for Gnome, KDE or something else you don't yet have. You may be in "dependency ****" ... don't know this application so I can't say. The stuff I built was all dependant only on curses, which is installed by default, so I was OK.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top