CorePlot:如何在设备上运行? (在模拟器上运行正常)

发布于 2024-10-04 05:56:56 字数 510 浏览 2 评论 0原文

我的应用程序使用 CorePlot 并在模拟器上运行良好
(它从以下位置访问 libCorePlot-CocoaTouch.a:
/Users/myName/core-plot/build/Debug-iphonesimulator )。

要在设备上运行,xcode 需要 libCorePlot-CocoaTouch.a 位于:
/Users/myName/core-plot/build/Debug-iphoneos
但是该文件丢失了,所以 xcode 给出错误:
'/Users/Giovanni/core-plot/build/Debug-iphoneos/libCorePlot-CocoaTouch.a:没有这样的文件或目录'

我尝试通过以下方式生成一个: CorePlot-CocoaTouch.proj >将 Xcode 设置为在“设备”上构建 > “构建并运行” 但“构建并运行”呈灰色显示。
复制模拟器版本显然不行。

有什么想法吗?

My app uses CorePlot and runs fine on simulator
(it accesses libCorePlot-CocoaTouch.a from:
/Users/myName/core-plot/build/Debug-iphonesimulator ).

To run on device, xcode expects libCorePlot-CocoaTouch.a in:
/Users/myName/core-plot/build/Debug-iphoneos
but that file is missing, so xcode gives error:
'/Users/Giovanni/core-plot/build/Debug-iphoneos/libCorePlot-CocoaTouch.a: No such file or directory'

I tried generating one by doing:
CorePlot-CocoaTouch.proj > set Xcode to build on 'device' > 'Build And Run'
but 'Build and Run' is grayed out.
Copying the simulator version obviously does not work.

Any ideas?

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

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

发布评论

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

评论(4

千鲤 2024-10-11 05:56:56

考虑添加 CorePlot-CocoaTouch.xcodeproj 作为子项目,然后添加 libCorePlot-CocoaTouch 作为依赖项。

Consider adding CorePlot-CocoaTouch.xcodeproj as a sub-project and then add libCorePlot-CocoaTouch as a dependency.

风轻花落早 2024-10-11 05:56:56

尝试打开 Core Plot 项目本身并首先构建框架。您应该构建(而不是“构建并运行”)CorePlot-CocoaTouch 目标。对 SDK {模拟器,设备} 和配置 {调试,发布} 的每个组合执行此操作(总共四个构建)。这将创建您需要的 .a 文件。

构建 Core Plot 后,返回到您的项目并构建它。现在它应该可以正确链接并运行。

Try opening the Core Plot project itself and building the framework first. You should build (not "Build and Run") the CorePlot-CocoaTouch target. Do it for each combination of SDK {simulator, device} and configuration {debug, release} (total of four builds). This will create the .a files you need.

After Core Plot is built, go back to your project and build it. It should now link and run correctly.

听闻余生 2024-10-11 05:56:56

如果您不想使用 CorePlot-CocoaTouch.xcodeproj 导入方法(不需要导入整个项目,只需导入 CorePlotHeader 文件夹和 libCorePlot-CocoaTouch.a 库文件),请查看我的答案修复核心图的链接器错误使用 Xcode 5

最终,您可能需要通过右键单击 Products 文件夹中的 MyApp.app 文件来删除旧库,然后将新的 CorePlot_1.4 .a 文件复制并粘贴到 Debug-iphoneos 文件夹中。 .clean、build,它应该在 iOS 7 设备上运行。

Check out my answer here if you don't want to use the CorePlot-CocoaTouch.xcodeproj import method (don't need to import the whole project, only the CorePlotHeader folder and the libCorePlot-CocoaTouch.a library file) Fix linker errors for Core Plot when using Xcode 5

Ultimately you might need to delete the old library by right clicking on your MyApp.app file in the Products folder and copy and past the new CorePlot_1.4 .a file into the Debug-iphoneos folder...clean, build, and it should run on an iOS 7 device.

ぺ禁宫浮华殁 2024-10-11 05:56:56

解决方案:问题是 CorePlot-CocoaTouch.xcodeproj 还必须添加为 Targets>MyApp>getInfo>DIRECT 依赖项(除了作为子项目以及 libCorePlot-CocoaTouch 添加为 Targets>MyApp>getInfo>LinkedLibraries 之外)。谢谢

SOLUTION: the issue was CorePlot-CocoaTouch.xcodeproj must also be added as Targets>MyApp>getInfo>DIRECT dependency (in addition to as subproject and in addition to libCorePlot-CocoaTouch being added as Targets>MyApp>getInfo>LinkedLibraries). Thanks

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