ld:找不到-llinphone的库

时间:2011-07-01 09:39:12

标签: xcode linker-errors ld

我在Xcode中遇到链接器错误,我在Mac虚拟机(雪豹10.6.6)中编译了Iphone代码,按照Mac OS自述文件中的说明,编译成功,

现在我必须在XCode中运行它,但我得到了错误。

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

日志的更多细节

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

我用谷歌搜索但无法修复它,请指导我解决这个问题,

问候

1 个答案:

答案 0 :(得分:4)

我也面临同样的问题,我通过阅读README文件解决了这个问题

  1. 从git下载linphone的新副本。
  2. 在打开代码之前,请按照README文件的说明进行操作。
  3. 现在打开你的项目。
  4. 转到BuildSetting并搜索“标题搜索路径”。在那里你会发现“子模块/ linphone / mediastreamer2 / include ”记录是两次。所以删除一个条目。
  5. 现在您可以编译代码而不会出现任何错误。