我下载了一个项目,我想尝试一下,但是当我尝试编译它时,我总是会遇到这个错误:
Build TuneIn Radio of project TuneInRadio with configuration Release
Ld "build/Release-iphonesimulator/TuneIn Radio.app/TuneIn Radio" normal i386
cd /Users/marco/Downloads/projects
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.2.sdk -L/Users/marco/Downloads/projects/build/Release-iphonesimulator -L/Users/marco/Downloads/projects -L/Users/marco/Downloads/projects/TuneInRadio-iphonesimulator -L/Users/marco/Downloads/projects/MMS/build/Release-iphonesimulator -L/Users/marco/Downloads/projects/ffmpeg/build/Release-iphonesimulator -F/Users/marco/Downloads/projects/build/Release-iphonesimulator -F/Users/marco/Downloads/projects -filelist "/Users/marco/Downloads/projects/build/TuneInRadio.build/Release-iphonesimulator/TuneIn Radio.build/Objects-normal/i386/TuneIn Radio.LinkFileList" -lTuneInRadio -llibmms -lffmpegLib -ObjC -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework CoreGraphics -framework QuartzCore -framework CoreFoundation -framework AudioToolbox -framework MediaPlayer -framework CoreLocation -framework UIKit -lz.1 -framework SystemConfiguration -framework MapKit -o "/Users/marco/Downloads/projects/build/Release-iphonesimulator/TuneIn Radio.app/TuneIn Radio"
ld: warning: directory '/Users/marco/Downloads/projects/TuneInRadio-iphonesimulator' following -L not found
ld: warning: directory '/Users/marco/Downloads/projects/MMS/build/Release-iphonesimulator' following -L not found
ld: library not found for -lTuneInRadio
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
关于我可以采取哪些步骤来达到错误的任何建议?
感谢的
答案 0 :(得分:0)
错误表明问题:
ld:找不到-lTuneInRadio的库
这意味着你的build / make正试图找到一个库(称为libTuneInRadio)来编译你正在尝试构建的程序,但它无法在路径中找到它(默认的那些+由gcc调用上的'-L'选项)。
不知道你正在编译/构建什么,因此除了错过这个库之外,不可能准确地说出发生了什么。
鉴于库的名称,听起来它应该是您正在尝试构建的项目的一部分(或者可能存在相关的TuneInRadio-lib项目),所以我建议阅读README或BUILDING或类似项目可能附带的命名文件,用于确定如何成功编译此程序。
答案 1 :(得分:0)
我在为iOS模拟器编译项目时遇到了同样的问题,问题是您下载的源代码不包含TuneInRadio-iphonesimulator的libTuneRadio.a库,因此首先创建该文件夹,然后再移动libTuneRadio.a TuneInRadio-iphoneos到最近创建的文件夹。这应该成功。
我的应用程序编译成功,但由于找不到任何CasseteAudioPlayer类而崩溃,所以我猜还是有问题。