XCode settings for linking
XCode settings for linking
- Subject: XCode settings for linking
- From: "Avery Nickelby" <email@hidden>
- Date: Wed, 3 Dec 2008 10:06:20 -0600
I am trying to embed Pantomime as a framework in my application bundle. I was able to compile Pantomime as a framework in the distribution provided; I just double clicked the .xcodeproj file and then built the framework. I then tried to add it to a test app. Things didn't go well; I tried to follow the directions on the developer page and I got a message like this:
ProcessPCH /var/folders/o4/o4lPr2iLFDig1mSgcI99GU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/AppKit-dimmvfoiyfaoxrfmuifcnnkkqjrk/AppKit.h.gch /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h normal i386 c com.apple.compilers.gcc.4_0
cd /Users/amazing/Development/SimpleSMTP2
/Developer/usr/bin/gcc-4.0 -x c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/amazing/Development/intermedBuild/SimpleSMTP2.build/Debug/Pantomime.build/Pantomime-generated-files.hmap -I/Users/amazing/Development/intermedBuild/SimpleSMTP2.build/Debug/Pantomime.build/Pantomime-own-target-headers.hmap -I/Users/amazing/Development/intermedBuild/SimpleSMTP2.build/Debug/Pantomime.build/Pantomime-all-target-headers.hmap -iquote /Users/amazing/Development/intermedBuild/SimpleSMTP2.build/Debug/Pantomime.build/Pantomime-project-headers.hmap -F/Users/amazing/Development/Builds/Debug -F/Users/amazing/Development/SimpleSMTP2/Pantomime.framework -I/Users/amazing/Development/Builds/Debug/include -I/Users/amazing/Development/SimpleSMTP2/Pantomime.framework/Headers -I/Users/amazing/Development/intermedBuild/SimpleSMTP2.build/Debug/Pantomime.build/DerivedSources -DMACOSX -c /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h -o /var/folders/o4/o4lPr2iLFDig1mSgcI99GU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/AppKit-dimmvfoiyfaoxrfmuifcnnkkqjrk/AppKit.h.gch
In file included from /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12,
from /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:10:
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:124: error: syntax error before '@' token
So I tried to compile the source in a "New Project" framework, to see if there were differences in build settings between my attempt to embed the framework and the downloaded copy. When I did this I found that the linker wasn't finding symbols for ssl. Here's the diff in output from the two attempts to link. Notice that there are link flags set in the command from the downloaded copy (the former) while there aren't in my own attempt (the latter):
Ld /Users/amazing/Development/Builds/debug/Pantomime.framework/Versions/A/Pantomime normal i386
cd "/Users/amazing/Downloads/Pantomime 5"
/Developer/usr/bin/gcc-4.0 -arch i386 -dynamiclib -isysroot /Developer/SDKs/MacOSX10.4u.sdk -L/Users/amazing/Development/Builds/debug -F/Users/amazing/Development/Builds/debug -filelist /Users/amazing/Development/intermedBuild/Pantomime.build/debug/Pantomime.build/Objects-normal/i386/Pantomime.LinkFileList -install_name @executable_path/../Frameworks/Pantomime.framework/Versions/A/Pantomime -mmacosx-version-min=10.4 -Wl,-dead_strip -seg1addr 0x10000000 -lssl -lcrypto -lresolv -framework Cocoa -framework CoreFoundation -Wl,-single_module -compatibility_version 1 -current_version 1 -o /Users/amazing/Development/Builds/debug/Pantomime.framework/Versions/A/Pantomime
Ld /Users/amazing/Development/Builds/Debug/Pantomime.framework/Versions/A/Pantomime normal i386
cd /Users/amazing/Development/Pantomime
/Developer/usr/bin/gcc-4.0 -arch i386 -dynamiclib -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/amazing/Development/Builds/Debug -F/Users/amazing/Development/Builds/Debug -filelist /Users/amazing/Development/intermedBuild/Pantomime.build/Debug/Pantomime.build/Objects-normal/i386/Pantomime.LinkFileList -install_name /Users/amazing/Library/Frameworks/Pantomime.framework/Versions/A/Pantomime -mmacosx-version-min=10.5 -framework Cocoa -framework CoreFoundation -Wl,-single_module -compatibility_version 1 -current_version 1 -o /Users/amazing/Development/Builds/Debug/Pantomime.framework/Versions/A/Pantomime
I looked in the inspector to compare the two, but I didn't see any flags set in the downloaded copy's build settings; the settings are AFAIK the same.
Questions:
1) Obviously the build settings aren't the same. Where else would I go to find out how these flags are being set? Why are these two compilation processes behaving differently?
2) What's the best way to go about embedding a framework? I've googled a bit but the information on developer.apple seems to be targeted at developing a framework first and then having a test app. I'm more interested in just embedding an already compiled framework into my app.
Thanks!
Avery
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden