Compiling SDL app on mac os x 10.4

takide <takide6of8 gmail.com> writes:

Bl0ckeduser, you mentioned Fink. Will I be able to build me SDL app like I
did on linux with it? and have it work on mac os x?

Yes, with Fink you should be able to build SDL apps on
Mac OS X using the Linux/Unix command style:

gcc $(sdl-config --libs --cflags) src/*.c

I just tried this command on 10.2 with Fink SDL installed
and it worked.

Hope this works for you.

Hi,

I build the Mac SDL.framework for 3 architectures: ppc, x86, x86_64.
ppc and x86 were build for 10.4 and greater, x86_64 built for 10.6 and
greater. I made changes to the stock Xcode project distributed with
SDL 1.2.15 using Xcode 3.2 .

My project is here if you want to take a look:

One thing I had to do was change the framework ‘Installation
Directory’ to ‘@executable_path/…/Frameworks’

Hope this helps,
DOn Tue, Feb 28, 2012 at 6:35 AM, Bl0ckeduser wrote:

takide <takide6of8 gmail.com> writes:

? ? ? Bl0ckeduser, you mentioned Fink. Will I be able to build me SDL app like I
did on linux with it? and have it work on mac os x?

Yes, with Fink you should be able to build SDL apps on
Mac OS X using the Linux/Unix command style:

? ?gcc $(sdl-config --libs --cflags) src/*.c

I just tried this command on 10.2 with Fink SDL installed
and it worked.

Hope this works for you.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks for suggesting fink, I installed all of the SDl related packages and ran your command with my file: ~/Desktop/lesson01 aaron$ gcc $(sdl-config --libs --cflags) lesson01.cpp

However I got this output:
/usr/bin/ld: Undefined symbols:
___gxx_personality_v0
collect2: ld returned 1 exit status

Which makes no sense to me at all. :?

http://stackoverflow.com/questions/203548/undefined-symbol-gxx-personality-v0-on-linkOn Wed, Feb 29, 2012 at 3:01 PM, takide wrote:

**
Thanks for suggesting fink, I installed all of the SDl related packages
and ran your command with my file: ~/Desktop/lesson01 aaron$ gcc
$(sdl-config --libs --cflags) lesson01.cpp

However I got this output:
/usr/bin/ld: Undefined symbols:
___gxx_personality_v0
collect2: ld returned 1 exit status

Which makes no sense to me at all. [image: Confused]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

you guys have no idea how much this has helped me. Everything has compiled successfully.

now that that has worked, how do I compile FINK’s SDL_image library with me source code?

takide <takide6of8 gmail.com> writes:

now that that has worked, how do I compile FINK’s SDL_image library with > me
source code?

From what I read in
http://www.libsdl.org/projects/SDL_image/docs/SDL_image_4.html, you could try
installing the Fink
SDL_image package (called sdl-image), and then issuing the command

g++ $(sdl-config --libs --cflags) -lSDL_image code.cpp

all good now guys, thanks for all of the support.

hi,

that’s really cool about how you compiled on fedora. Do you have make
files, or build scripts on how you did it?

cheers,On Tue, Mar 6, 2012 at 12:33 AM, takide wrote:

**
all good now guys, thanks for all of the support.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I compiled sdl on ubuntu (linux) using terminal. I navigate to my project directory and issue the following command:
g++ myprogram.cpp -lSDL

If your using other libraries as well, you can use this:
g++ myprogram.cpp -lSDL -lSDL_image

I found some great tutorials at lazyfoo.net you should check it out if your learning sdl- thats where I learned it.

Hope this helped, Takide

takide wrote:

I compiled sdl on ubuntu (linux) using terminal. I navigate to my
project directory and issue the following command:
g++ myprogram.cpp -lSDL

BTW, g++ myprogram.cpp sdl-config --cflags sdl-config --libs is the
recommended portable way of compiling from the command line. In certain
cases, writing only -lSDL won’t do. (For example, you might have to link
in other libraries; indeed, I believe on some Linux variants it is
necessary to link libpthread).