佳能 EDSDK 2.8(Xcode 3.2.2 - 雪豹 10.6.3)
我正在尝试使用 Canon EDSDK 2.8 构建一个应用程序。我在 Xcode 中创建了一个新的 Cocoa 应用程序项目,并导入了头文件和框架文件。当我尝试构建并运行(不编写任何代码)时,我收到两个警告,指出框架缺少 x86_64 架构文件。如果我尝试导入“EDSDK.h”头文件,我最终会遇到大约 100 个杂项错误。
我尝试将架构更改为 i386,但是当我尝试构建并运行时,我收到一个调试器错误,提示“无法访问地址 0x0 处的内存”。
奇怪的是,我可以让与 SDK 捆绑在一起的示例应用程序顺利编译和运行,
任何人都知道为什么会发生这种情况吗?
I'm trying to build an application using the Canon EDSDK 2.8. I created a new Cocoa Application project in Xcode, and imported the headers and framework files. When I try to build and run (without writing any code), I get two warnings that say the frameworks are missing x86_64 architecture files. If I try and import the "EDSDK.h" header file, I end up with about 100 miscellaneous errors.
I've tried changing the architecture to i386, however when I try and build and run, I get a debugger error that says "Cannot access memory at address 0x0".
The odd thing is that I can get the example applications bundled with the SDK to compile and run without issues,
Anyone have any ideas as to why this is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为了能够编译项目,您必须在 xcode 目标的属性窗口中设置框架搜索路径,并在 xcode 项目的属性窗口中设置标头搜索路径。看看佳能提供的示例项目。
EDSDK 目前不兼容 64 位。如果您想编写 64 位应用程序,则必须将 EDSDK 包含在 32 位帮助器应用程序中,并实现应用程序和帮助器应用程序之间的通信。
希望这有帮助。
In order to be able to compile the project, you have to set the framework search paths in the xcode target's property window and also the header search paths in the xcode project's property window. have a look at the sample projects provided by canon.
The EDSDK currently is not 64-Bit compatible. If you want to write a 64-Bit app, you have to include the EDSDK in a 32-Bit helper application and implement communication between the app and the helper app.
hope this helps.
更新一下,看来我已经明白了。显然在目标下,您需要添加一个构建阶段,将 EDSDK.framework 复制到目标的 Framework 目录。
Update, looks like I figured it out. Apparently under the target, you need to add a build phase which copies the EDSDK.framework to the Framework directory of the target.
我最近在 www.canonsdk.com 上回答了类似的问题。查看 Mac 部分。当您这样做时,请发布一些有关如何使回调适用于简单的 C 命令行应用程序的信息:)
I recently answered a similar question at www.canonsdk.com. Take a look under the Mac section. And while you're at it, please post some info on how to get callbacks working for a simple C command line app :)