On 13 Sep 2009, at 16:14, Andrew C. Smith wrote:
So, I just upgraded to Snow Leopard (anyone else? I feel like the list's guinea pig here) and now I'm getting awful compilation errors. "gcc" gives me 4.2.1, as does g++, so it's not the exact same as the 4.3 problem from the forum.
Before, I could download the CVS and compile straight-through, but now I get this:
$ make osx make -f makefile.osx gcc -D__MACOSX_CORE__ -c -O3 rtmidi.cpp rtmidi.cpp: In function ‘int get_device_name(SInt32, char*, int)’: rtmidi.cpp:295: error: cannot convert ‘void**’ to ‘MIDIObjectRef*’ for argument ‘2’ to ‘OSStatus MIDIObjectFindByUniqueID(MIDIUniqueID, MIDIObjectRef*, MIDIObjectType*)’ rtmidi.cpp:304: error: cast from ‘void*’ to ‘MIDIDeviceRef’ loses precision rtmidi.cpp:306: error: cast from ‘void*’ to ‘MIDIEntityRef’ loses precision rtmidi.cpp:312: error: cast from ‘void*’ to ‘MIDIEndpointRef’ loses precision
These are typedef'ed to MIDIObjectRef, which in turn, is typedef'ed to UInt32, in /System/Library/Frameworks/CoreMIDI.framework/Headers/MIDIServices.h Since 10.6 is 64-bit, a pointer cannot be held in a 32-bit integral type. So this must be changed. Happy code tweaking! Hans