Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

badmac78

macrumors 6502
Original poster
Jan 15, 2008
250
0
Atlanta
I've been developing for about a year now with XCode and wanted something more descriptive when debugging. I found that someone had created a Log4j port for Cocoa (Log4Cocoa). Trying to get the framework to work, but I get the following error when compiling. Any ideas?


Using XCode 3.2.3

Build WordsThatFit of project WordsThatFit with configuration Debug

CompileC build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/Objects-normal/i386/wordDictionaryHelper.o wordDictionaryHelper.m normal i386 objective-c com.apple.compilers.gcc.4_2
cd "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit"
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-function -Wunused-variable -Wunused-value -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/WordsThatFit-generated-files.hmap" "-I/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/WordsThatFit-own-target-headers.hmap" "-I/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/WordsThatFit-all-target-headers.hmap" -iquote "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/WordsThatFit-project-headers.hmap" "-F/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/Debug-iphonesimulator" -F/Developer/Library/Frameworks -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/Developer/Library/Frameworks "-I/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/Debug-iphonesimulator/include" "-I/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/DerivedSources/i386" "-I/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/DerivedSources" -include /var/folders/99/99EcC0bxHs8SzmIWoFNAYU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/WordsThatFit_Prefix-dwjybaiqxddwxzccssqvqkasylsw/WordsThatFit_Prefix.pch -c "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/wordDictionaryHelper.m" -o "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/Objects-normal/i386/wordDictionaryHelper.o"

...

Ld build/Debug-iphonesimulator/WordsThatFit.app/WordsThatFit normal i386
cd "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk "-L/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/Debug-iphonesimulator" "-F/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/Debug-iphonesimulator" -F/Developer/Library/Frameworks -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/Developer/Library/Frameworks -filelist "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/WordsThatFit.build/Debug-iphonesimulator/WordsThatFit.build/Objects-normal/i386/WordsThatFit.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework iAd -framework Log4Cocoa -o "/Users/blah/Dropbox/Business/AppleSeed Technologies/Code/WordsThatFit/build/Debug-iphonesimulator/WordsThatFit.app/WordsThatFit"

ld: framework not found Log4Cocoa
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
 
There's no framework search path that includes the directory where your Log4Cocoa framework is found.

Did you add the Log4Cocoa.framework file to your project? That should be all that's needed to find it.
 
If you are developing for the iPhone be aware you cannot use Frameworks in it. You can use statically linked libraries as they are linked into the executable at compile time. There is no dynamic/run-time linking on the device.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.