Installing SDL on tiger

Apprentice
Posts: 9
Joined: 2008.07
Post: #1
I did a search before i posted and none of the problems seem to match my error

I DL sdl framework, stuck it in /libarary/framework/
dl the extras, copied the templates. started xcode and selected a sdl template project. Then hit build and got this error
(step vary widely, i played around with many things, i also build SDL from source and made install it with no problems)

whats with this error? Sad
------------
Building target “sdl_test2b” of project “sdl_test2b”


Checking Dependencies
CompileC build/sdl_test2b.build/Debug/sdl_test2b.build/Objects-normal/i386/main.o /shared/dev/sdl_test2b/main.c normal i386 c com.apple.compilers.gcc.4_0
cd /shared/dev/sdl_test2b
/usr/bin/gcc-4.0 -x c -arch i386 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -mfix-and-continue -mmacosx-version-min=10.4 -I/shared/dev/sdl_test2b/build/sdl_test2b.build/Debug/sdl_test2b.build/sdl_test2b.hmap -F/shared/dev/sdl_test2b/build/Debug -F/Users/jimbojones/Library/Frameworks -F/Library/Frameworks -I/shared/dev/sdl_test2b/build/Debug/include -I/Users/jimbojones/Library/Frameworks/SDL.framework/Headers -I/Library/Frameworks/SDL.framework/Headers -I/shared/dev/sdl_test2b/build/sdl_test2b.build/Debug/sdl_test2b.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -c /shared/dev/sdl_test2b/main.c -o /shared/dev/sdl_test2b/build/sdl_test2b.build/Debug/sdl_test2b.build/Objects-normal/i386/main.o

Ld /shared/dev/sdl_test2b/build/Debug/sdl_test2b.app/Contents/MacOS/sdl_test2b normal i386
cd /shared/dev/sdl_test2b
/usr/bin/gcc-4.0 -o /shared/dev/sdl_test2b/build/Debug/sdl_test2b.app/Contents/MacOS/sdl_test2b -L/shared/dev/sdl_test2b/build/Debug -F/shared/dev/sdl_test2b/build/Debug -F/Users/jimbojones/Library/Frameworks -F/Library/Frameworks -filelist /shared/dev/sdl_test2b/build/sdl_test2b.build/Debug/sdl_test2b.build/Objects-normal/i386/sdl_test2b.LinkFileList -framework SDL -framework Cocoa -arch i386 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
/usr/bin/ld: /Library/Frameworks/SDL.framework/SDL load command 6 unknown cmd field
collect2: ld returned 1 exit status
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #2
You have a linker error. When using SDL with Xcode, the usual cause of linker errors is Xcode being unable to find the SDL framework and header files. To fix the problem, you must add the path to the SDL framework and header files to Xcode's list of search paths.

In Xcode select the name of your project from the Groups and Files list and click the Info button on the project window toolbar. This will open the project's information panel. Click the Build tab to modify the build settings. Go to the Search Paths build settings collection. Add the path to the SDL framework to the Framework Search Paths build setting. Add the path to the SDL header files to the Header Search Paths build setting.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2008.07
Post: #3
automatically it had this in the header search path --> $(HOME)/Library/Frameworks/SDL.framework/Headers /Library/Frameworks/SDL.framework/Headers $(HEADER_SEARCH_PATHS)

and this in the framework search path --> $(HOME)/Library/Frameworks /Library/Frameworks $(FRAMEWORK_SEARCH_PATHS)
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2008.07
Post: #4
i already built sdl so i figure i should try it instead of the framework
after i found where it was located i added /usr/local/include and /usr/local/lib + sdl dylib and .a

I was able to build and link no problem.

What should i do now? should i replace the files in sdl.framework with the ones i built?
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #5
AcidZombie24 Wrote:should i replace the files in sdl.framework with the ones i built?

No. Don't mess with the files inside the SDL.framework folder.

If you were able to build your project using the SDL libraries you built yourself, use those libraries instead of the SDL framework.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2008.07
Post: #6
what should i do when i want to redistribute the app?
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #7
There are three options. The first option is to get your game to build using the SDL framework. The Xcode SDL project templates will copy the SDL framework to your application bundle for you. This option would be a short-term hassle for you, but could pay off long-term.

The second option is to not include any SDL libraries with your game. This is a bad option because people who haven't installed the SDL framework would be unable to play your game.

The final option is to copy the SDL library you built to the application bundle. Click the disclosure triangle next to the name of your target in the Groups and Files List, you should see a build phase called Copy Frameworks into app bundle if you're using one of the Xcode SDL templates. Drag your library to the Copy Frameworks into app bundle build phase. If you're not using the Xcode SDL project templates, you would use the Copy Files build phase instead. If you don't have a Copy Files build phase, choose Project > New Build Phase in Xcode to add the build phase.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  fmod on tiger (10.4.11) AcidZombie24 2 2,629 Sep 10, 2008 01:05 PM
Last Post: AcidZombie24
  Tiger breaks SDL? sealfin 7 4,951 Jun 10, 2005 07:13 AM
Last Post: sealfin
  Installing and Using SDL DudetheCreator 3 2,854 May 22, 2005 08:42 AM
Last Post: DudetheCreator
  Installing SDL AndyWanKenobi 1 2,510 Dec 12, 2002 03:41 PM
Last Post: OneSadCookie