Apple Mach-O Linker Error

Jul 2, 2013 at 4:51 PM
Hi all,

I just downloaded the OData4ObjC library and am getting the following AppleMach-O Linker errors when I build:
Ld /Users/eduncan/Library/Developer/Xcode/DerivedData/ResourceApp-faufoypvsxmcqtdfkqijzqdzijqd/Build/Products/Debug-iphonesimulator/ResourceApp.app/ResourceApp normal i386
    cd "/Users/eduncan/Dropbox/Continuum/iPhone App/ResourceApp"
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/eduncan/Library/Developer/Xcode/DerivedData/ResourceApp-faufoypvsxmcqtdfkqijzqdzijqd/Build/Products/Debug-iphonesimulator -LUsers/eduncan/Documents/ODataSDK/Framework/bin/odatalib/lib/iPhoneDeviceLibs/iPhone_Device_4.2 -L../../../../Documents/ODataSDK/Framework/bin/odatalib/lib/iPhoneDeviceLibs/iPhone_Device_4.2/release -F/Users/eduncan/Library/Developer/Xcode/DerivedData/ResourceApp-faufoypvsxmcqtdfkqijzqdzijqd/Build/Products/Debug-iphonesimulator -filelist /Users/eduncan/Library/Developer/Xcode/DerivedData/ResourceApp-faufoypvsxmcqtdfkqijzqdzijqd/Build/Intermediates/ResourceApp.build/Debug-iphonesimulator/ResourceApp.build/Objects-normal/i386/ResourceApp.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework UIKit -lMSODataLib -framework Foundation -framework CoreGraphics -o /Users/eduncan/Library/Developer/Xcode/DerivedData/ResourceApp-faufoypvsxmcqtdfkqijzqdzijqd/Build/Products/Debug-iphonesimulator/ResourceApp.app/ResourceApp

ld: warning: directory not found for option '-LUsers/eduncan/Documents/ODataSDK/Framework/bin/odatalib/lib/iPhoneDeviceLibs/iPhone_Device_4.2'
ld: warning: ignoring file ../../../../Documents/ODataSDK/Framework/bin/odatalib/lib/iPhoneDeviceLibs/iPhone_Device_4.2/release/libMSODataLib.a, missing required architecture i386 in file ../../../../Documents/ODataSDK/Framework/bin/odatalib/lib/iPhoneDeviceLibs/iPhone_Device_4.2/release/libMSODataLib.a (2 slices)
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_DataServiceQuery", referenced from:
      objc-class-ref in Entities.o
  "_OBJC_CLASS_$_ODataObject", referenced from:
      _OBJC_CLASS_$_Model_association in Entities.o
      _OBJC_CLASS_$_Model_holiday in Entities.o
      _OBJC_CLASS_$_Model_member in Entities.o
      _OBJC_CLASS_$_Model_department in Entities.o
      _OBJC_CLASS_$_Model_date in Entities.o
      _OBJC_CLASS_$_Model_person in Entities.o
      _OBJC_CLASS_$_Model_cumulative in Entities.o
      ...
  "_OBJC_CLASS_$_ObjectContext", referenced from:
      _OBJC_CLASS_$_Entities in Entities.o
  "_OBJC_CLASS_$_mProperties", referenced from:
      objc-class-ref in Entities.o
  "_OBJC_IVAR_$_ODataObject.m_OData_entityKey", referenced from:
      -[Model_association initWithUri:] in Entities.o
      -[Model_holiday initWithUri:] in Entities.o
      -[Model_member initWithUri:] in Entities.o
      -[Model_department initWithUri:] in Entities.o
      -[Model_date initWithUri:] in Entities.o
      -[Model_person initWithUri:] in Entities.o
      -[Model_cumulative initWithUri:] in Entities.o
      ...
  "_OBJC_IVAR_$_ODataObject.m_OData_hasStream", referenced from:
      -[Model_association initWithUri:] in Entities.o
      -[Model_holiday initWithUri:] in Entities.o
      -[Model_member initWithUri:] in Entities.o
      -[Model_department initWithUri:] in Entities.o
      -[Model_date initWithUri:] in Entities.o
      -[Model_person initWithUri:] in Entities.o
      -[Model_cumulative initWithUri:] in Entities.o
      ...
  "_OBJC_IVAR_$_ODataObject.my_OData_propertiesMap", referenced from:
      -[Model_association initWithUri:] in Entities.o
      -[Model_holiday initWithUri:] in Entities.o
      -[Model_member initWithUri:] in Entities.o
      -[Model_department initWithUri:] in Entities.o
      -[Model_date initWithUri:] in Entities.o
      -[Model_person initWithUri:] in Entities.o
      -[Model_cumulative initWithUri:] in Entities.o
      ...
  "_OBJC_METACLASS_$_ODataObject", referenced from:
      _OBJC_METACLASS_$_Model_association in Entities.o
      _OBJC_METACLASS_$_Model_holiday in Entities.o
      _OBJC_METACLASS_$_Model_member in Entities.o
      _OBJC_METACLASS_$_Model_department in Entities.o
      _OBJC_METACLASS_$_Model_date in Entities.o
      _OBJC_METACLASS_$_Model_person in Entities.o
      _OBJC_METACLASS_$_Model_cumulative in Entities.o
      ...
  "_OBJC_METACLASS_$_ObjectContext", referenced from:
      _OBJC_METACLASS_$_Entities in Entities.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I get this error even with the provided samples. Does anyone know what could be the cause of this? Maybe I'm missing a library?

I included the provided framework as well as adding the odatalib/include to the Header Search Path and iPhoneDeviceLibs/iPhoneDevice.4.2 to the Library Search Path (both recursive).