Wanted: Linux porting tutorial

Buckey

Registered
I have a Linux program I'd like to port to OS X but don't know how. Does anyone know where I can find a step by step tutorial for porting Linux applications. The programmer uses the Gnu compiler for the Linux and Windows versions. I believe that Gnu is also the compiler for OS X?

The author of the software says "The library application.so (Unix version) should compile without any changes using the original Makefile (please wait for next version)."

What are the step by step actions I need to take to do the above?

So I'm looking for a step by step tutorial on how to compile Linux programs on OS X. Does anyone know where one is available? Would anyone like to make a tutorial and use this application as the sample code? It is freely available.

TIA

Buckey
 
Well, it's hard to create a step-by-step tutorial without knowing the errors you're going to encounter.

In general, you run the make and see what errors occur. Some errors will be easy to fix. If it says it can't find a file, locate that file and then fix the path in the code. If it says a variable is undefined, search the system header files until you find which one contains that variable on MacOS X and then #include that file.

If you run into problems beyond that, you're probably running into more serious issues and we'd have to know exactly what they are in order to help.

Wade
 
I am not looking for a tutorial that gives solutions to every possible error, just a step by step walkthrough of what one can expect. For example,

Step 0, Open your makefile and change or check the following (e.g. change gcc to cc)
Step 1, Start up terminal
Step 2, use the following commands to navigate to your source directory (cd, ls, etc. with examples)
Step 3, Type "make xxx" to make the file.

Here are the five (or so) most common errors you will encounter and suggested solutions. Other errors are less common and are beyond the scope of this tutorial.

The thing is I had to dig through a lot of sites just to find out about changing gcc to cc. The more apps we get working on OS X the stronger the platform will be.
 
Back
Top