문제

I've seen this question around quite a lot but I'm fairly new to C++ and I've tried following each answer. I am trying to use the libsndfile lib with XCode and mac osx mavericks. However the problem lies with

/* 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

where I get the error 'Unknown type name '__int64' I understand this is due to __int64 being for windows but how can I change this for a mac?

도움이 되었습니까?

해결책 2

I've found something that works. For anyone who wishes to use the libsndfile library with a mac should look at this:

https://github.com/angeloseme/ofxLibsndfileRecorder

Download the files and dump all of the files within your src folder. Works perfectly. Credit to the author.

다른 팁

I'm not familiar with this library. Are you sure you include the right header file. It seems from the comment that this file is intended to be used with Windows. Anyway...

__int64_t should be defined in some other header. It is typedef for long long. To workaround this you can add typedef long long __int64_t; before you include the header.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top