我经常看到这个问题,但是我对C++还是很陌生的,我试着跟踪每一个答案。我正在尝试使用libsndfile与XCode和mac的特立独行。然而,问题在于
/* The following typedef is system specific and is defined when libsndfile is
** compiled. sf_count_t can be one of loff_t (Linux), off_t (*BSD), off64_t
** (Solaris), __int64_t (Win32) etc. On windows, we need to allow the same
** header file to be compiler by both GCC and the microsoft compiler.
*/
#ifdef _MSCVER
typedef __int64_t sf_count_t ;
#define SF_COUNT_MAX 0x7fffffffffffffffi64
#else
typedef __int64_t sf_count_t ;
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
#endif在哪里我得到错误‘未知类型名称' __int64’,我知道这是由于__int64是为windows,但我如何改变这个为一个mac?
发布于 2014-01-05 22:16:38
我找到了有用的东西。对于任何希望使用带有mac的libsndfile库的人,应该查看以下内容:
https://github.com/angeloseme/ofxLibsndfileRecorder
下载这些文件并转储src文件夹中的所有文件。效果很好。归功于作者。
发布于 2014-01-05 16:11:27
我对这个图书馆不熟悉。您确定包含了正确的头文件。从注释中可以看出,此文件用于Windows。不管怎样..。
__int64_t应该在其他报头中定义。它长时间都是胡枝子。要解决这个问题,您可以在包含标头之前添加typedef长__int64_t。
https://stackoverflow.com/questions/20935712
复制相似问题