包含后未声明的方法

发布于 2024-10-15 08:40:38 字数 1182 浏览 4 评论 0原文

我正在尝试使用 aubio 库用 C 语言编写一个简单的 bpm 计算程序。

一切似乎都很顺利,直到我尝试调用 aubio_tempo_do文档< /a>)

不幸的是,make 向我提供了错误:

‘aubio_tempo_do’ was not declared in this scope

考虑到 aubio 库提供了此功能,这似乎没有多大意义:

grep -r "aubio_tempo_do" /usr/local/include/aubio/
/usr/local/include/aubio/tempo/tempo.h:void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);

我尝试将 tempo.h 文件包含在我的头文件中,但可惜 make例程继续抛出相同的错误。

// header file
#include <aubio/aubio.h>
#include <aubio/tempo.h>

有什么想法吗?

== 编辑 ===========

还应该说我已经尝试过:

#include <aubio/tempo/tempo.h>

没有运气:\

== 编辑 ===========

g++ 的输出,带有 -用于检查预处理的 E 标志:http://pastebin.com/mbFEysJ2

源代码可以在此处找到:http://github.com/kellydunn/grover

相关源代码摘录:http://pastebin.com/KRmbZqg4

I'm attempting to write a simple bpm calculation program in C with using the aubio library.

Everything seems to be going smoothly until I attempt to call upon aubio_tempo_do (documentation)

Unfortuantely, make provides me with the error:

‘aubio_tempo_do’ was not declared in this scope

which doesn't seem to make too much sense, considering the aubio library provides this function:

grep -r "aubio_tempo_do" /usr/local/include/aubio/
/usr/local/include/aubio/tempo/tempo.h:void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);

I attempt to include the tempo.h file in my header file, but alas the make routine continues to spout out the same error.

// header file
#include <aubio/aubio.h>
#include <aubio/tempo.h>

Any thoughts?

== Edit ===========

It should also be said that I've attempted:

#include <aubio/tempo/tempo.h>

With no luck :\

== Edit ===========

Output of g++ with the -E flag to check preprocesses: http://pastebin.com/mbFEysJ2

Source code can be found here: http://github.com/kellydunn/grover

Relevant source code excerpt: http://pastebin.com/KRmbZqg4

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

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

发布评论

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

评论(2

來不及說愛妳 2024-10-22 08:40:38

您传递给 aubio_tempo_do 的参数类型是否正确?
(aubio_tempo_t *o,fvec_t * 输入,fvec_t * 节奏)
我无法从示例代码中看出。

如果没有,编译器可能会抱怨它没有看到带有与您的参数匹配的签名的函数的重载版本...(尽管我认为对于这种情况会有更具描述性的错误消息)。

do the arguments you are passing to aubio_tempo_do have the right types?
(aubio_tempo_t *o, fvec_t * input, fvec_t * tempo)
I can't tell from the sample code.

If not, the compiler could be complaining that it doesn't see an overloaded version of the function with a signature that matches your arguments... (Although I would think there would be a more descriptive error message for that situation).

℉絮湮 2024-10-22 08:40:38

据我所知你应该包含另一个文件

#include <aubio/tempo/tempo.h>

As far as I can see you should include another file

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