Question

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?

Was it helpful?

Solution 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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top