2

I am facing linker error in Xcode, I compiled Iphone code in Mac Virtual Machine (snow leopard 10.6.6) by following instruction in it Readme file for Mac OS, It compiled successfully,

Now i have to run it in XCode but i am getting fallowing error.

ld: library not found for -llinphone
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

More detail of logs

Ld /Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku    /Build/Products/Debug-iphonesimulator/linphone.app/linphone normal i386
    cd /Users/mac/Desktop/Iphone/linphone-iphone
    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.3.sdk 
-L/Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator
-L/Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator
-L/Users/mac/Desktop/Iphone/linphone-iphone/liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins
-L/Users/mac/Desktop/Iphone/linphone-iphone/liblinphone-sdk/apple-darwin/lib
-F/Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator
-filelist /Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Intermediates/linphone.build/Debug-iphonesimulator/linphone.build/Objects-normal/i386/linphone.LinkFileList
-mmacosx-version-min=10.6 -l linphone -l mediastreamer -Xlinker -objc_abi_version -Xlinker 2 -lssl -lcrypto 
-framework Foundation -weak_framework UIKit
-framework CoreGraphics -framework CoreAudio
-framework AudioToolbox -leXosip2 -losip2 
-losipparser2 -lspeex -lspeexdsp 
-framework AVFoundation -framework AddressBookUI
-framework AddressBook -framework SystemConfiguration -lilbc -lmsilbc 
-framework CFNetwork -lortp -lresolv -lopencore-amrwb -lopencore-amrnb -lmsamr
-o /Users/mac/Library/Developer/Xcode/DerivedData/linphone-hbezhyqawbboavbueofzjzfsukku/Build/Products/Debug-iphonesimulator/linphone.app/linphone

I googled it but could not fix it, please guide me to fix this issue,

Regards

Thomas Berger
  • 1,860
  • 13
  • 26
Ballu
  • 31
  • 3
  • no reply yet:( i have added linker flag in linking tab of Xcode (-llinphone) and mentioned path of search library but still i am unable to fix it . – Ballu Jul 04 '11 at 03:43
  • Please refer to my answer [enter link description here][1] [1]: http://stackoverflow.com/questions/11609763/how-to-integrate-linphone-into-an-existing-project-sip-in-ios/15925914#15925914 – user366584 Apr 10 '13 at 12:32

1 Answers1

4

I have also face the same issue and i have solved it by reading README file

  1. download fresh copy of linphone from git.
  2. Before you open your code just follow the instruction of README file.
  3. Now open your project.
  4. Goto BuildSetting and search "Header Search Path". In that you will find that "submodules/linphone/mediastreamer2/include" record is twice.So remove one entry.
  5. Now you can compile your code without any error.
Yashesh
  • 1,799
  • 1
  • 11
  • 29