在 iPhone 中启动 TTPhotoviewController 时收到 SIGABRT 错误

发布于 2024-08-17 17:04:22 字数 1549 浏览 7 评论 0原文

嗯,我正在创建一个 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 添加到其他链接器标志时,出现此错误。 请参阅下图,了解我的其他链接器标志当前的样子。

请参阅链接获取图像:http://i49.tinypic.com/262o7q1.png

情况 2: 编译顺利,应用程序在模拟器中完美运行,但通过设备接收 SIGABRT。

在本例中,我删除了“其他链接器标志”中的标志 -all_load。现在,我没有收到任何编译错误,但在点击链接到照片查看器应用程序的表格行时,我收到了 SIGABRT。

我不确定我是否正确链接到照片查看器,所以这是我推送其他照片视图的部分。

PhotoTest2Controller *photoViewController = [[PhotoTest2Controller alloc] init];
[self.navigationController pushViewController:photoViewController animated:YES];
[photoViewController release];

另外,这里链接器的另一个屏幕截图标记了它们在这种情况下的定义方式:

请参阅链接查看图像: http://i47.tinypic.com/vhuv0z.png

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: http://i49.tinypic.com/262o7q1.png

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:
http://i47.tinypic.com/vhuv0z.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹊巢 2024-08-24 17:04:22

最后我找到了解决方案。您可以在除出现重复错误的库之外的所有需要​​的库中使用“-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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文