gcc-4.2 失败,退出代码 1 错误
我下载了一个项目,我想尝试一下,但是当我尝试编译它时,我总是收到此错误:
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
有关我可以遵循哪些步骤来达到错误的任何建议?
谢谢
i downloaded a project and i want to try it, but when i'm trying to compile it i get always this error:
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
Any advice on what kind of steps i can follow to reach the error ?
Thank's
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该错误表明问题:
ld:找不到 -lTuneInRadio 库,
这意味着您的构建/制作正在尝试找到一个库(称为 libTuneInRadio)来编译您尝试构建的程序,但在路径(默认路径 + gcc 调用时“-L”选项描述的路径)。
不了解您正在编译/构建的内容,除了缺少此库之外,无法准确说出正在发生的情况。
考虑到库的名称,听起来它应该是您尝试构建的项目的一部分(或者可能有一个相关的 TuneInRadio-lib 项目),所以我建议阅读 README 或 BUILDING 或类似命名的文件可能随项目一起提供来确定如何成功编译该程序。
The error indicates the problem:
ld: library not found for -lTuneInRadio
this means that your build/make is trying to find a library (called libTuneInRadio) to compile this program you're trying to build but it can't find it in the paths (the default ones + the ones described by the '-L' options on gcc call).
Not knowing any more about what you're compiling/building makes it impossible to say precisely what's happening other than you're missing this library.
Given the name of the library, it sounds like it should be part of the project you're trying to build (or maybe there is a related TuneInRadio-lib project), so I would suggest reading the README or BUILDING or similarly named file that might have come with the project to determine how to successfully compile this program.
我在编译 iOS 模拟器项目时遇到了同样的问题,问题是您下载的源代码不包含 TuneInRadio-iphonesimulator 的 libTuneRadio.a 库,因此首先创建该文件夹,然后从 TuneInRadio-iphoneos 移动 libTuneRadio.a到最近创建的文件夹。那应该可以了。
我的应用程序编译成功,但它崩溃了,因为它找不到任何 CasseteAudioPlayer 类,所以我猜仍然有问题。
I had the same problem compiling the project for iOS simulator, the problem is that the source code you downloaded does not contain the libTuneRadio.a library for TuneInRadio-iphonesimulator, so first create that folder and second move the libTuneRadio.a from TuneInRadio-iphoneos to the recently created folder. That should make it.
My application compiled successfully but it crashes as it cannot find any CasseteAudioPlayer class, so i guess there is still something wrong.