包含后未声明的方法
我正在尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您传递给
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).
据我所知你应该包含另一个文件
As far as I can see you should include another file