More SDL C++ Xcode 1.2 problems

samfold
Unregistered
 
Post: #1
I can use the sdl templates for standard c programs with sdl.

However getting sdl to work with c++ is proving impossible.

I complied sdl 1.2.9, however it didnt appear to install anything anywhere after carrying out ./configure, make, make install.

Can someone give some basic steps to get this to work? I deleted every instance of sdl I could find on my system, unzipped 1.2.9, did ./configure, make, sudo make install. The following was the result of the "make install"

Is it supposed to stick the results into /Library/Frameworks?

Nb: Im running the latest version of osx.

If I can get the frameworks compiled and installed, how then do I configure an xcode project to use them? Simply just manually add the framework, or change the framework search paths in the prefs or.. what?

Code:
Sams-Computer:~/Desktop/SDL-1.2.9 Sam$ sudo make install
Password:
Making install in src
Making install in main
test -z "/usr/local/lib" || /Users/Sam/Desktop/SDL-1.2.9/install-sh -d "/usr/local/lib"
/usr/bin/install -c -m 644 'libSDLmain.a' '/usr/local/lib/libSDLmain.a'
ranlib '/usr/local/lib/libSDLmain.a'
make[3]: Nothing to be done for `install-data-am'.
Making install in audio
Making install in disk
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in macosx
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in macrom
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in video
Making install in dummy
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in quartz
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in events
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in joystick
Making install in darwin
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in cdrom
Making install in macosx
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in thread
make  install-am
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in timer
make  install-am
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in endian
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in file
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
Making install in cpuinfo
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2 -Wall -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -I/System/Library/Frameworks/Carbon.framework/Headers       -I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings       -DENABLE_QUARTZ -DMACOSX -DTARGET_API_MAC_CARBON=1 -I../src/video/quartz -DHAVE_OPENGL -D_THREAD_SAFE -DSDL_USE_PTHREADS -DPTHREAD_NO_RECURSIVE_MUTEX -DHAVE_SEMUN -DHAVE_SIGACTION -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -faltivec -I../include -I../include/SDL -I../src -I../src/main/macosx -I../src/audio -I../src/video -I../src/video/XFree86/extensions -I../src/events -I../src/joystick -I../src/cdrom -I../src/thread -I../src/timer -I../src/endian -I../src/file -I../src/thread   -o libSDL.la -rpath /usr/local/lib -no-undefined -release 1.2 -version-info 7:2:7 SDL.lo SDL_error.lo SDL_fatal.lo SDL_getenv.lo SDL_loadso.lo main/libarch.la audio/libaudio.la video/libvideo.la events/libevents.la joystick/libjoystick.la cdrom/libcdrom.la thread/libthread.la timer/libtimer.la endian/libendian.la file/libfile.la cpuinfo/libcpuinfo.la -framework OpenGL -framework AGL -framework AudioToolbox -framework AudioUnit -framework IOKit -lstdc++ -framework Cocoa -framework Carbon -framework QuickTime
rm -fr  .libs/libSDL.lax
rm -fr .libs/libSDL.lax
mkdir .libs/libSDL.lax
rm -fr .libs/libSDL.lax/libarch.a
mkdir .libs/libSDL.lax/libarch.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/main/.libs/libarch.a
rm -fr .libs/libSDL.lax/libaudio.a
mkdir .libs/libSDL.lax/libaudio.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/audio/.libs/libaudio.a
rm -fr .libs/libSDL.lax/libvideo.a
mkdir .libs/libSDL.lax/libvideo.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/video/.libs/libvideo.a
rm -fr .libs/libSDL.lax/libevents.a
mkdir .libs/libSDL.lax/libevents.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/events/.libs/libevents.a
rm -fr .libs/libSDL.lax/libjoystick.a
mkdir .libs/libSDL.lax/libjoystick.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/joystick/.libs/libjoystick.a
rm -fr .libs/libSDL.lax/libcdrom.a
mkdir .libs/libSDL.lax/libcdrom.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/cdrom/.libs/libcdrom.a
rm -fr .libs/libSDL.lax/libthread.a
mkdir .libs/libSDL.lax/libthread.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/thread/.libs/libthread.a
rm -fr .libs/libSDL.lax/libtimer.a
mkdir .libs/libSDL.lax/libtimer.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/timer/.libs/libtimer.a
rm -fr .libs/libSDL.lax/libendian.a
mkdir .libs/libSDL.lax/libendian.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/endian/.libs/libendian.a
rm -fr .libs/libSDL.lax/libfile.a
mkdir .libs/libSDL.lax/libfile.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/file/.libs/libfile.a
rm -fr .libs/libSDL.lax/libcpuinfo.a
mkdir .libs/libSDL.lax/libcpuinfo.a
Extracting /Users/Sam/Desktop/SDL-1.2.9/src/cpuinfo/.libs/libcpuinfo.a
gcc -dynamiclib  -o .libs/libSDL-1.2.0.7.2.dylib  .libs/SDL.o .libs/SDL_error.o .libs/SDL_fatal.o .libs/SDL_getenv.o .libs/SDL_loadso.o  .libs/libSDL.lax/libarch.a/arch.o  .libs/libSDL.lax/libaudio.a/SDL_audio.o .libs/libSDL.lax/libaudio.a/SDL_audiocvt.o .libs/libSDL.lax/libaudio.a/SDL_audiodev.o .libs/libSDL.lax/libaudio.a/SDL_audiomem.o .libs/libSDL.lax/libaudio.a/SDL_coreaudio.o .libs/libSDL.lax/libaudio.a/SDL_diskaudio.o .libs/libSDL.lax/libaudio.a/SDL_mixer.o .libs/libSDL.lax/libaudio.a/SDL_mixer_m68k.o .libs/libSDL.lax/libaudio.a/SDL_mixer_MMX.o .libs/libSDL.lax/libaudio.a/SDL_mixer_MMX_VC.o .libs/libSDL.lax/libaudio.a/SDL_romaudio.o .libs/libSDL.lax/libaudio.a/SDL_wave.o  .libs/libSDL.lax/libvideo.a/SDL_blit.o .libs/libSDL.lax/libvideo.a/SDL_blit_0.o .libs/libSDL.lax/libvideo.a/SDL_blit_1.o .libs/libSDL.lax/libvideo.a/SDL_blit_A.o .libs/libSDL.lax/libvideo.a/SDL_blit_N.o .libs/libSDL.lax/libvideo.a/SDL_bmp.o .libs/libSDL.lax/libvideo.a/SDL_cursor.o .libs/libSDL.lax/libvideo.a/SDL_gamma.o .libs/libSDL.lax/libvideo.a/SDL_nullevents.o .libs/libSDL.lax/libvideo.a/SDL_nullmouse.o .libs/libSDL.lax/libvideo.a/SDL_nullvideo.o .libs/libSDL.lax/libvideo.a/SDL_pixels.o .libs/libSDL.lax/libvideo.a/SDL_QuartzEvents.o .libs/libSDL.lax/libvideo.a/SDL_QuartzGL.o .libs/libSDL.lax/libvideo.a/SDL_QuartzVideo.o .libs/libSDL.lax/libvideo.a/SDL_QuartzWindow.o .libs/libSDL.lax/libvideo.a/SDL_QuartzWM.o .libs/libSDL.lax/libvideo.a/SDL_QuartzYUV.o .libs/libSDL.lax/libvideo.a/SDL_RLEaccel.o .libs/libSDL.lax/libvideo.a/SDL_stretch.o .libs/libSDL.lax/libvideo.a/SDL_surface.o .libs/libSDL.lax/libvideo.a/SDL_video.o .libs/libSDL.lax/libvideo.a/SDL_yuv.o .libs/libSDL.lax/libvideo.a/SDL_yuv_mmx.o .libs/libSDL.lax/libvideo.a/SDL_yuv_sw.o  .libs/libSDL.lax/libevents.a/SDL_active.o .libs/libSDL.lax/libevents.a/SDL_events.o .libs/libSDL.lax/libevents.a/SDL_expose.o .libs/libSDL.lax/libevents.a/SDL_keyboard.o .libs/libSDL.lax/libevents.a/SDL_mouse.o .libs/libSDL.lax/libevents.a/SDL_quit.o .libs/libSDL.lax/libevents.a/SDL_resize.o  .libs/libSDL.lax/libjoystick.a/SDL_joystick.o .libs/libSDL.lax/libjoystick.a/SDL_sysjoystick.o  .libs/libSDL.lax/libcdrom.a/AudioFilePlayer.o .libs/libSDL.lax/libcdrom.a/AudioFileReaderThread.o .libs/libSDL.lax/libcdrom.a/CAGuard.o .libs/libSDL.lax/libcdrom.a/CDPlayer.o .libs/libSDL.lax/libcdrom.a/SDL_cdrom.o .libs/libSDL.lax/libcdrom.a/SDL_syscdrom.o  .libs/libSDL.lax/libthread.a/SDL_syscond.o .libs/libSDL.lax/libthread.a/SDL_sysmutex.o .libs/libSDL.lax/libthread.a/SDL_syssem.o .libs/libSDL.lax/libthread.a/SDL_systhread.o .libs/libSDL.lax/libthread.a/SDL_thread.o  .libs/libSDL.lax/libtimer.a/SDL_systimer.o .libs/libSDL.lax/libtimer.a/SDL_timer.o  .libs/libSDL.lax/libendian.a/SDL_endian.o  .libs/libSDL.lax/libfile.a/SDL_rwops.o  .libs/libSDL.lax/libcpuinfo.a/SDL_cpuinfo.o   -framework OpenGL -framework AGL -framework AudioToolbox -framework AudioUnit -framework IOKit -lstdc++ -framework Cocoa -framework Carbon -framework QuickTime  -install_name  /usr/local/lib/libSDL-1.2.0.dylib -Wl,-compatibility_version -Wl,8 -Wl,-current_version -Wl,8.2
ld: Undefined symbols:
__Unwind_Resume
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libSDL.la] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
Sams-Computer:~/Desktop/SDL-1.2.9 Sam$
Quote this message in a reply
Member
Posts: 168
Joined: 2004.10
Post: #2
Why aren't you using the prebuilt 1.2.9 package? It comes with xcode projects and stuff.

And you should look out for a project builder directory in the source, xcode supports those.

The C programs worked, then you should install it the same way, just change the compiler to G++ instead of GCC on command line coded SDL projects. Otherwise, it should work just fine.
Quote this message in a reply
samfold
Unregistered
 
Post: #3
Im not using the prebuilt package because I read that if you want to use sdl with c++ the prebuilt package had issues with os 10.4 and so you had to build sdl manually.

It was this thread: http://www.idevgames.com/forum/showthread.php?t=10175

Im using xcode to build and compile my programs so I cant simply just change what compiler im using to c++. Ive tried starting a new c++ project (command line utility: c++ tool) and then trying to configure that manually to use sdl. However I just ended up getting lots of errors this way..(using the intstructions that come with the sdl source code)

I had a c program working perfectly and if I knew how to change the xcode project settings to have it compile as a c++ program it would be ok. (ie: cout was not recognised as a viable function).However I couldnt seem to be able to get to the "Rules" section to change the compiler settings. I also think I would need to change other things also to make it an "official" c++ program.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  GLFW Xcode 3 Problems Matt328 0 2,206 Nov 21, 2008 05:55 AM
Last Post: Matt328
  XCode private framework problems AdrianM 1 3,672 Oct 18, 2008 12:06 PM
Last Post: OneSadCookie
  SDL/SDL_mixer problems with Xcode poffy 1 3,509 Mar 7, 2006 02:45 AM
Last Post: OneSadCookie