iOS,CoreAudio:一个奇怪的“CADebugPrintf.h:没有这样的文件或目录...”错误

发布于 2024-10-16 07:03:13 字数 512 浏览 2 评论 0原文

在“iPublicUtility”文件夹中有一堆与音频相关的Apple示例代码的帮助文件,例如aurioTouch: http://developer.apple.com/library/ios/ #samplecode/aurioTouch/Introduction/Intro.html

我可以很好地构建这些示例。但是每当我创建一个新项目进行测试并包含“iPublicUtility”文件夹中的文件时,我都会得到: “CADebugPrintf.h:没有这样的文件或目录...”“CADebugMacros.h”文件中出现错误。

我将我的测试项目的设置与Apple示例一致,但是这个错误是 不会消失。有什么建议吗?

SDK:iOS 4.2, iMac OSX 10.6.6

谢谢大家。

西

There are bunch of helper filess in 'iPublicUtility' folder of several audio related Apple sample codes, such as aurioTouch:
http://developer.apple.com/library/ios/#samplecode/aurioTouch/Introduction/Intro.html

I can build these samples fine. But whenever I create a new project for testing and include the files from 'iPublicUtility' folder, I get:
'CADebugPrintf.h: no such file or directory ... ' error in 'CADebugMacros.h' file.

I made the settings of my test project to coincide with Apple samples, but this error is
not going away. Any suggestion?

SDK: iOS 4.2,
iMac OSX 10.6.6

Thanks all.

sy

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

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

发布评论

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

评论(5

秋千易 2024-10-23 07:03:13

选择目标,打开“构建设置”窗格,搜索“预处理器宏”。将字段留空(我已经删除了 DEBUG 条目)

select the Target, open the Build Settings pane, search for "Preprocessor Macros". Leave the fields blank (I've got rid of a DEBUG entry)

策马西风 2024-10-23 07:03:13

我使用了 Justin 提供的答案,效果很好,直到我安装了 Xcode 4.3.1 后问题又出现了。

目前我通过下载 CADebugPrintf.h 和 .cpp 解决了这个问题。

我在此链接中找到了两个文件:

http://svn.perian.org/trunk/CoreAudio /PublicUtility/

干杯。

I used the answer provided by Justin and it worked fine, until I installed Xcode 4.3.1 and the problem came back.

Currently I solved this by downloading CADebugPrintf.h and .cpp.

I found the 2 files at this link:

http://svn.perian.org/trunk/CoreAudio/PublicUtility/

Cheers.

我一直都在从未离去 2024-10-23 07:03:13

我安装了三个 Xcode 发行版。

该文件存在于所有三个中。

1) 验证您的系统上是否存在该文件。

2a)为您的项目添加 PublicUtility 目录的搜索路径

,或

2b)将标头添加到目标的“复制标头”构建阶段,

具体取决于您对这些文件有多少依赖项,您可能需要更可靠的方法(存在) 。如果您使用大量音频技术和源,一种(相当)安全/简单的方法是将其父目录的父目录添加到您的搜索路径或源树(递归地)。

另一种方法是将其添加到共享构建设置文件中。

您还可以将特定版本复制到某处,然后将其添加到您的搜索路径中。请注意,源代码会定期更新,因此您必须在合适的时间进行更新。在这种情况下,您还应该更改您的项目引用。

编辑:添加搜索路径 (2a)

添加搜索路径的一种方法(假设 Xcode 工具安装在:/Developer/):

1) 在 Xcode (3) 中,选择目标。

2) cmd+i(获取信息)

3) 选择信息窗口的“Build”选项卡

4) 在搜索字段中输入 HEADER_SEARCH_PATHS

5) 如果该值未在此级别定义(例如,不是粗体),则 如果已在该级别定义该值,则将其设置为 /Developer/Extras/CoreAudio/PublicUtility/ $(inherited)

,然后添加 /Developer/Extras/CoreAudio/PublicUtility/ > 到要搜索的目录列表(值)。

如果您想递归搜索库,请使用/Developer/Extras/CoreAudio/**。在构建 AU 或需要 AU 包含和 PublicUtility 包含的其他项目时,这可能很有用。

i have three distributions of Xcode installed.

the file exists in all three.

1) verify that the file exists on your system.

2a) add a search path to your project for the PublicUtility directory

or

2b) add the header to the target's "copy headers" build phase

depending on how many depends you have for these files, you may want a more reliable approach (which exists). one (fairly) safe/easy way to do this if you use a lot of the audio technologies and sources is to add its parent dir's parent dir to your search paths or source trees (recursively).

another way is to add it to a shared build settings file.

you could also copy a specific release someplace, then add that to your search paths. just be aware that the sources get updated somewhat regularly, so you'll have to update it when it's a good time for you. in this case, you'll should change your project references as well.

Edit: Adding the search path (2a)

One way to add a search path (assuming Xcode tools are installed at : /Developer/):

1) In Xcode (3), select the target.

2) cmd+i (get info)

3) select the "Build" tab of the info window

4) enter HEADER_SEARCH_PATHS into the search field

5) if the value is not defined at this level (e.g., it is not bold), then set the value to /Developer/Extras/CoreAudio/PublicUtility/ $(inherited)

if it is already defined at that level, then add /Developer/Extras/CoreAudio/PublicUtility/ to the list of directories to search (the value).

if you want to search the library recursively, use /Developer/Extras/CoreAudio/**. this may be useful when building AUs, or other projects which require the AU includes and PublicUtility includes.

梦冥 2024-10-23 07:03:13

同样的问题,但似乎已经通过从下面的链接下载并添加缺少的 CADebugPrintf.h 和 CADebugPrintf.cpp 文件来修复它。

https://developer.apple.com/library/ios/samplecode /CoreAudioUtilityClasses/Listings/CoreAudio_PublicUtility_CADebugPrintf_h.html

Same problem, but seemed to have fixed it by downloading from the link below and adding in the missing CADebugPrintf.h and CADebugPrintf.cpp files.

https://developer.apple.com/library/ios/samplecode/CoreAudioUtilityClasses/Listings/CoreAudio_PublicUtility_CADebugPrintf_h.html

野鹿林 2024-10-23 07:03:13

我遇到了同样的问题,将文件下载到 iPublicUtility 文件夹中并没有解决它。我在此页面上了解 .mm 扩展文件时偶然找到了答案:

目标使用 C++ POSIX 类的 C 项目

我用 .mm 重命名了我的实现文件,编译器错误消失了。希望这可以帮助某人!

I was having the same problem and downloading the files into the iPublicUtility folder did not solve it. I found the answer by accident while learning about .mm extension files on this page:

Objective C Project using C++ POSIX Classes

I renamed my implementation file with a .mm and the compiler errors disappeared. Hope this may help someone down the line!

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