2014-01-05 47 views
0

我已经看到了很多这个问题,但我对C++相当陌生,并且我尝试了下面的每个答案。我正在尝试将libsndfile lib与XCode和mac osx小牛队一起使用。然而,问题在于C++ libsndfile和mac osx

/* 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是为窗户,但我怎样才能改变这种对于Mac?

回答

0

我对这个图书馆不熟悉。你确定你包含正确的头文件吗?从评论看来,该文件旨在用于Windows。无论如何...

__int64_t应该在其他标题中定义。这是很长的typedef。 要解决此问题,您可以添加typedef long long __int64_t;在包含标题之前。