2014-01-05 46 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;在包含標題之前。