在 iPhone 中启动 TTPhotoviewController 时收到 SIGABRT 错误
嗯,我正在创建一个 iPhone 应用程序,其中包含一些功能,例如自行车路线和照片查看器。
对于这些自行车路线,我使用 Cloudmade api,对于 PhotoViewer,我使用 Three20 的 TTPhotoviewcontroller。
这些自行车路线地图工作完美,但我认为它与我遇到的错误有关。
我将在这里描述两个案例,说明我尝试过的内容以及我遇到的问题。
案例1: 编译出错并收到以下错误:
duplicate symbol _aatan2 in /Users/wesleycoppens/Documents/MooiWest/libs/Proj4/Device/libProj4.a(aasincos.o) and /Users/wesleycoppens/Documents/MooiWest/libs/route-me/Device/libMapView.a(aasincos.o)
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
当我尝试将标志 -all_load 添加到其他链接器标志时,出现此错误。 请参阅下图,了解我的其他链接器标志当前的样子。
请参阅链接获取图像:
情况 2: 编译顺利,应用程序在模拟器中完美运行,但通过设备接收 SIGABRT。
在本例中,我删除了“其他链接器标志”中的标志 -all_load。现在,我没有收到任何编译错误,但在点击链接到照片查看器应用程序的表格行时,我收到了 SIGABRT。
我不确定我是否正确链接到照片查看器,所以这是我推送其他照片视图的部分。
PhotoTest2Controller *photoViewController = [[PhotoTest2Controller alloc] init];
[self.navigationController pushViewController:photoViewController animated:YES];
[photoViewController release];
另外,这里链接器的另一个屏幕截图标记了它们在这种情况下的定义方式:
请参阅链接查看图像:
Well I'm creating an iPhone application which contains some features like Cycle routes and a Photoviewer.
For these Cycle routes im useing the Cloudmade api, and for the PhotoViewer im useing Three20's TTPhotoviewcontroller.
These Cycle routes map works perfect but i think it has todo something with the errors im getting.
I will describe 2 cases down here about what I tried and what problem I received.
Case 1:
Compiling goes wrong and receiving following error:
duplicate symbol _aatan2 in /Users/wesleycoppens/Documents/MooiWest/libs/Proj4/Device/libProj4.a(aasincos.o) and /Users/wesleycoppens/Documents/MooiWest/libs/route-me/Device/libMapView.a(aasincos.o)
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
I am getting this error when i am trying to add to the Other linker flags the flag -all_load.
See the image below here how my Other linker flags currently look like.
see link for image:
Case 2:
Compiling goes fine, app runs in simulator perfectly but receiving SIGABRT with device.
In this case I removed the flag -all_load in my Other linker flags. Now I am not receiving any compiling error, but I'm receiving a SIGABRT when tapping the tablerow which links to the photoviewer app.
I aint sure if I do link correctly to the Photoviewer to, so here is the part where I push the other photoview.
PhotoTest2Controller *photoViewController = [[PhotoTest2Controller alloc] init];
[self.navigationController pushViewController:photoViewController animated:YES];
[photoViewController release];
Also here another screenshot of the linker flags how they are defined in this case:
see link for image:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我找到了解决方案。您可以在除出现重复错误的库之外的所有需要的库中使用“-force_load path_to_library/libXXX.a”,而不是使用“-all_load”标签。这对我有用!希望有帮助。
finally I found a solution for this. Instead of using "-all_load" tag you can use "-force_load path_to_library/libXXX.a" in all the libraries you need except the one you get the duplicate error. It worked for me! Hope it helps.