Debugging linker error with Xcode - sdl static library - xcode

I am trying to follow this guide here for building SDL2 for iOS:
http://lazyfoo.net/tutorials/SDL/52_hello_mobile/ios_mac/index.php
I am able to build the libSDL2.a static library, however I am getting a linker error when I attempt to build his example hello world application which uses it.
Ld /Users/testuser/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-egvszvnfjpicgqdtaazpczjuebut/Build/Products/Debug-iphonesimulator/___PROJECTNAME___.app/___PROJECTNAME___ normal x86_64
cd "/Users/testuser/Documents/iosBuild/SDL iOS Application"
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -L/Users/testuser/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-egvszvnfjpicgqdtaazpczjuebut/Build/Products/Debug-iphonesimulator -F/Users/testuser/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-egvszvnfjpicgqdtaazpczjuebut/Build/Products/Debug-iphonesimulator -filelist /Users/testuser/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-egvszvnfjpicgqdtaazpczjuebut/Build/Intermediates/___PROJECTNAME___.build/Debug-iphonesimulator/___PROJECTNAME___.build/Objects-normal/x86_64/___PROJECTNAME___.LinkFileList -mios-simulator-version-min=10.0 -Xlinker -object_path_lto -Xlinker /Users/testuser/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-egvszvnfjpicgqdtaazpczjuebut/Build/Intermediates/___PROJECTNAME___.build/Debug-iphonesimulator/___PROJECTNAME___.build/Objects-normal/x86_64/___PROJECTNAME____lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -lSDL2 -framework GameController -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework CoreAudio -framework AudioToolbox -framework CoreGraphics -framework CoreMotion -Xlinker -dependency_info -Xlinker /Users/testuser/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-egvszvnfjpicgqdtaazpczjuebut/Build/Intermediates/___PROJECTNAME___.build/Debug-iphonesimulator/___PROJECTNAME___.build/Objects-normal/x86_64/___PROJECTNAME____dependency_info.dat -o /Users/testuser/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-egvszvnfjpicgqdtaazpczjuebut/Build/Products/Debug-iphonesimulator/___PROJECTNAME___.app/___PROJECTNAME___
ld: library not found for -lSDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Per his instructions, I copied the project template and added the libSDL2.a lib that I built under the Build Phases -> link binary with libraries menu:
Any suggestions for how I can debug this problem?
Edit: My build target configuration in the project which uses the library:

try to build your library with this script. the final product will be placed in your home ~/SDL directory.
#!/bin/sh
PREFIX=$HOME/SDL
SYMROOT="SYMROOT=$PREFIX/release"
SDK_DEVICE="-sdk iphoneos"
SDK_SIMULATOR="-sdk iphonesimulator"
CONF_DEBUG="-configuration Debug"
CONF_RELEASE="-configuration Release"
mkdir -p $PREFIX
cd $PREFIX
wget https://www.libsdl.org/release/SDL2-2.0.4.zip
unzip SDL2-2.0.4.zip
rm -f SDL2-2.0.4.zip
# ------------------------------------------------------------------------
# SDL
# ------------------------------------------------------------------------
cd $PREFIX/SDL2-2.0.4/Xcode-iOS/SDL
SCHEME="libSDL"
PROJ="-project SDL.xcodeproj"
#xcodebuild OTHER_CFLAGS="-fembed-bitcode" OTHER_LDFLAGS="-lobjc" ONLY_ACTIVE_ARCH=NO -arch i386 -arch x86_64 $PROJ $SDK_SIMULATOR $CONF_DEBUG -scheme='$SCHEME' build $SYMROOT
xcodebuild OTHER_CFLAGS="-fembed-bitcode" ONLY_ACTIVE_ARCH=NO -arch i386 -arch x86_64 $PROJ $SDK_SIMULATOR $CONF_RELEASE -scheme='$SCHEME' build $SYMROOT
#xcodebuild OTHER_CFLAGS="-fembed-bitcode" OTHER_LDFLAGS="-lobjc" ONLY_ACTIVE_ARCH=NO -arch arm64 -arch armv7 $PROJ $SDK_DEVICE $CONF_DEBUG -scheme='$SCHEME' build $SYMROOT
xcodebuild OTHER_CFLAGS="-fembed-bitcode" ONLY_ACTIVE_ARCH=NO -arch arm64 -arch armv7 $PROJ $SDK_DEVICE $CONF_RELEASE -scheme='$SCHEME' build $SYMROOT
lipo $PREFIX/release/Release-iphonesimulator/libSDL2.a $PREFIX/release/Release-iphoneos/libSDL2.a -create -output $PREFIX/libSDL2.a

It's likely that the static library you built does not contain the architecture for which you're building your application. You'll need to build a static library that contains the architectures for the platform you want to build.
Also, keep in mind that it's not actually supported to put architectures for different platforms (such as iOS and tvOS, or even iOS and iOS Simulator—the simulators are separate platforms) in a single binary. You'll need a separate library or framework for each platform you're targeting, though each one can of course contain slices for all of that platform's supported architectures.

Related

Since Xcode 13.3, I'm seeing an error when compiling in Terminal with -flto

On macOS 12.3 I am working on a patch to build HandBrake with -flto. It then can be build in Terminal with ./configure --lto. This worked nicely with Xcode 13.2 and 13.2.1 installed. But since I have updated to Xcode 13.3 (compiler updated to Apple clang version 13.1.6 (clang-1316.0.21.2)) it fails with the following error:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.13 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -L/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot -L/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/libhb -L/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/contrib/lib -F/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot -filelist /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI.build/Objects-normal/x86_64/HandBrakeCLI.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI.build/Objects-normal/x86_64/HandBrakeCLI_lto.o -filelist /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/macosx/osl.filelist.txt -lc++ -w -framework Foundation -liconv -lbz2 -lz -framework CoreMedia -framework CoreVideo -framework VideoToolbox -framework CoreGraphics -framework CoreText -lavfilter -framework AudioToolbox -framework CoreServices -framework IOKit -lopus -lhandbrake -lass -lavcodec -lavformat -lavutil -lbluray -ldav1d -ldvdnav -ldvdread -lspeex -lturbojpeg -lfreetype -lfribidi -lmp3lame -llzma -lpostproc -logg -lswscale -ltheora -lvorbis -lswresample -lvorbisenc -lvpx -lx264 -lxml2 -ljansson -lharfbuzz -lzimg -Xlinker -dependency_info -Xlinker /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI.build/Objects-normal/x86_64/HandBrakeCLI_dependency_info.dat -o /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI
ld: linking module flags 'override-stack-alignment': IDs have conflicting values in '/Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/contrib/lib/libx264.a(base.o)' and 'ld-temp.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/Nomis101/Documents/GitHub/HandBrakeKopie/build/xroot/HandBrakeCLI normal (in target 'HandBrakeCLI' from project 'HandBrake')
(1 failure)
make: *** [macosx.build] Error 65
I've tried already to remove and compile the necessary toolchain (nasm, cmake...) with the same version of Xcode. I've reinstalled the CommandLineTools, I removed them completely. I've added flags -fno-stack-check and similar. Nothing helped. I have no idea what the reason of this is, I'm really lost right now. I also could not find anything in the Release Notes of Xcode 13.3.

archiving in xcode 7.3.1

i am trying to get my app on testflight for testing. however when following the instruction on this video https://www.youtube.com/watch?v=6tydk4Fc-tg&t=302s everything work up to trying to archive the app.
i get the below error and i'm not quite sure what to do. if you have any idea on how to solve this problem, please help. i'm using Xcode 7.3.1 and ivy 1.9.1.
ld: warning: directory not found for option
'-L/Users/nabi/Desktop/kivy-ios/break-ios/../build/lib'
ld: warning: directory not found for option
'-F/Users/nabi/Desktop/kivy-ios/dist/frameworks'
ld: '/Users/nabi/Desktop/kivy-ios/dist/lib/libfreetype.a(ftsystem.o)'
does not contain bitcode. You must rebuild it with bitcode enabled
(Xcode setting ENABLE_BITCODE), obtain an updated library from the
vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Ld
/Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break
normal arm64
cd /Users/nabi/Desktop/kivy-ios/break-ios
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk
-L/Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/BuildProductsPath/Release-iphoneos
-L/Users/nabi/Desktop/kivy-ios/break-ios/../dist/lib -L/Users/nabi/Desktop/kivy-ios/break-ios/../build/lib -F/Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/BuildProductsPath/Release-iphoneos
-F/Users/nabi/Desktop/kivy-ios/dist/frameworks -filelist /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break.LinkFileList
-miphoneos-version-min=8.1 -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/BuildProductsPath/Release-iphoneos
-all_load -fobjc-link-runtime -framework AudioToolbox -framework ImageIO -framework MessageUI -framework UIKit -framework OpenGLES
-framework CoreMotion -framework MobileCoreServices -framework CoreGraphics -framework Accelerate -framework QuartzCore -lc++ -lz
-lsqlite3 -lbz2 -lfreetype -lsdl2_mixer -lsdl2 -lsdl2_image -lffi -lkivy -lpython -lios -lsdl2_ttf -Xlinker -dependency_info -Xlinker /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break_dependency_info.dat
-o /Users/nabi/Library/Developer/Xcode/DerivedData/break-bnyieydgxnbwarhabzewbmeqxnyr/Build/Intermediates/ArchiveIntermediates/break/IntermediateBuildFilesPath/break.build/Release-iphoneos/break.build/Objects-normal/arm64/break
ld: warning: directory not found for option
'-L/Users/nabi/Desktop/kivy-ios/break-ios/../build/lib' ld: warning:
directory not found for option
'-F/Users/nabi/Desktop/kivy-ios/dist/frameworks' ld:
'/Users/nabi/Desktop/kivy-ios/dist/lib/libfreetype.a(ftsystem.o)' does
not contain bitcode. You must rebuild it with bitcode enabled (Xcode
setting ENABLE_BITCODE), obtain an updated library from the vendor, or
disable bitcode for this target. for architecture arm64 clang: error:
linker command failed with exit code 1 (use -v to see invocation)
The error tells you clearly what to do. When you see the dialog that asks if you want to rebuild using bitcode, you must uncheck that option. If you are not even getting that far, use the build settings of your target to disable bitcode:
In that screen shot, you'd need to switch from Yes to No.

Xcode libtool error on OpenTrack build

I have used CMake 3.3.0-rc4 to generate an Xcode project for OpenTrack. However, when I attempt to build the ALL_BUILD target in Xcode 6.4, I immediately get the error below.
Libtool build/Debug/libopentrack-version.a normal x86_64
cd /Users/david/Documents/Programming/OpenTrack
export MACOSX_DEPLOYMENT_TARGET=10.10
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/user/Documents/Programming/OpenTrack/build/Debug -filelist /Users/user/Documents/Programming/OpenTrack/build/opentrack.build/Debug/opentrack-version.build/Objects-normal/x86_64/opentrack-version.LinkFileList -stdlib=libc++ -framework Cocoa -framework CoreFoundation -lobjc -lz -framework Carbon -o /Users/user/Documents/Programming/OpenTrack/build/Debug/libopentrack-version.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `t' in: -stdlib=libc++
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
The Build Settings for the project has the following set for Linking / Other Librarian Flags:
OTHER_LIBTOOLFLAGS = -stdlib=libc++ -framework Cocoa -framework CoreFoundation -lobjc -lz -framework Carbon
From the libtool usage statement above, it looks to me like this set of options was generated for an entirely different version of libtool. What can I do (if anything) to get this project to build with the current version of Xcode?
You cannot use the flag -stdlib=libc++ or -framework with libtool, as they are valid only in the linker, so you should make OTHER_LIBTOOLFLAGS empty as none of those options apply

scan-build linker error in xcode target build fails, but links correctly within xcodebuild

so im having a linker error while building an xcode project when using scan-build
for my normal xcodebuild command i use the following
xcodebuild -target LibCoreMobileGHUnit -configuration Debug -sdk iphonesimulator5.0 clean build
and it uses the following options for the linker phase
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld"
-demangle
-dynamic
-arch i386
-all_load
-ios_simulator_version_min 5.0.0
-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
-ObjC
-o /Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/Debug-iphonesimulator/LibCoreMobileGHUnit.app/LibCoreMobileGHUnit
-lcrt1.o
-L/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/Debug-iphonesimulator
-filelist /Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/LibCoreMobile.build/Debug-iphonesimulator/LibCoreMobileGHUnit.build/Objects-normal/i386/LibCoreMobileGHUnit.LinkFileList
-objc_abi_version 2
-no_implicit_dylibs
-lz
-framework QuartzCore
-framework UIKit
-framework Foundation
-framework CoreGraphics
-framework GHUnitIOS
-force_load /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
-framework Foundation
-lobjc
-lc++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.profile_ios.a
-lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.ios.a
-F/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/Debug-iphonesimulator
-F/Applications/Xcode.app/Contents/Developer/Library/Frameworks
-F/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/LibCoreMobileGHUnit
-F/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/ExternalFrameworks
and this is sucessfull
however when I run the following
scan-build -k -v -v -o ../clangScanBuildReports xcodebuild -target LibCoreMobileGHUnit -configuration Debug -sdk iphonesimulator5.0 clean build
it links with the following options:
"/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld"
-dynamic
-arch i386
-all_load
-ios_simulator_version_min 5.0.0
-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
-ObjC
-o /Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/Debug-iphonesimulator/LibCoreMobileGHUnit.app/LibCoreMobileGHUnit
-lcrt1.o
-L/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/Debug-iphonesimulator
-filelist /Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/LibCoreMobile.build/Debug-iphonesimulator/LibCoreMobileGHUnit.build/Objects-normal/i386/LibCoreMobileGHUnit.LinkFileList
-objc_abi_version 2
-no_implicit_dylibs
-lz
-framework QuartzCore
-framework UIKit
-framework Foundation
-framework CoreGraphics
-framework GHUnitIOS
-force_load /Users/ops/tools/checker-269/lib/arc/libarclite_iphonesimulator.a
-framework Foundation
-lobjc
-lc++
-lSystem
-F/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/build/Debug-iphonesimulator
-F/Applications/Xcode.app/Contents/Developer/Library/Frameworks
-F/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/LibCoreMobileGHUnit
-F/Users/ops/workspace/MobileFramework_Test_IOS_Client/LibCoreMobile/ExternalFrameworks
so theres a few things here that are different
when running scan-build it seems to be using a different linker
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld vs
/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
in the normal xcodebuild it has an extra option -demangle
and in the scan-build it is missing the two libclang libs
-lc++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.profile_ios.a
-lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.1/lib/darwin/libclang_rt.ios.a
Does anyone know how i could force the libaries to be included in the linker flags on the "scan-build" execution.

Problems with Code from SVN

I have a problem with my iOS code when pulling it from the SVN. My code works fine on my MAC, but after I upload it to SVN and try to build my project it shows the same error over and over.
Apple Mach-O Linker (id) error
ld: library not found for -lzbar
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
This problem is pretty annoying and makes my work on the code very difficult. Here is the complete error:
Ld /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator/SmartDealer.app/SmartDealer normal i386
cd "/Users/administrator/Desktop/test/Trade-In 4S"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator "-L/Users/administrator/Desktop/test/Trade-In 4S" "-L/Users/administrator/Desktop/test/Trade-In 4S/Classes/ZBarSDK" "-L/Users/administrator/Desktop/test/Trade-In 4S/ZBarSDK" -F/Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator -filelist /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Intermediates/SmartDealer.build/Debug-iphonesimulator/SmartDealer.build/Objects-normal/i386/SmartDealer.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -lsqlite3 -framework QuartzCore -weak_framework CoreMedia -weak_framework CoreVideo -liconv -lzbar -weak_framework AVFoundation -o /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator/SmartDealer.app/SmartDealer
ld: library not found for -lzbar
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
Thanks for your help!
Are you sure that the 'ZBarSDK' folder was successfully included in SVN? It seems that you're trying to link to a framework in that folder, so you should either find a standardized location for the framework and install it on all development machines, or leave your project alone but make sure that the ZBarSDK folder is successfully added to your SVN repo along with your other source.
You can do this from the command line--just cd into your project folder and svn add ZBarSDK.

Resources