Le 18/01/12 18:56, Roger Dannenberg a écrit :
Hi Nicolas,
After a quick check, it seems that this is called an anonymous union. It's legal in C++ but apparently not in C, although I guess many compilers are lenient. I should change the code, but meanwhile, there's probably either a compiler flag you can set or you can compile the C code with a C++ compiler.
    -Roger
Roger,
would it be a huge job to refactor the code to be compiled by a C compiler ?

++
nicolas

On 1/18/12 11:45 AM, nico wrote:
hi,
as Roger mentioned earlier, portmidi contain few sources so i'm trying to get rid off libportmidi.dylib and include sources directly in my project.
unfortunately, xcode complains here in readbinaryplist.h

// an value_node is a value with a tag telling the type
typedef struct value_struct {
    int tag;
    union {
        int64_t integer;
        uint64_t uinteger;
        double real;
        char *string;
        pldata_ptr data;
        array_ptr array;
        struct dict_struct *dict;
}; <---------------------here telling that declaration does not declare anything
} value_node, *value_ptr;

any ideas?

best regards,
Nicolas


Le 15/01/12 20:51, Roger Dannenberg a écrit :
Hi,
I just emailed you off-list, but on second thought, the code below does not open a device, and outStream (or more specifically, *outStream) is uninitialized. Passing an uninitialized pointer to Pm_HasHostError() is pretty likely to cause a crash. Use Pm_OpenOutput first. -Roger

On 1/15/12 7:34 AM, dev don wrote:
///INITMIDIOUT
     int  pmErrInit  =  Pm_Initialize();
     int  devCount  =   Pm_CountDevices();
     int  devOutId  =   Pm_GetDefaultOutputDeviceID();
     const  PmDeviceInfo  *  devOutInfo  =  Pm_GetDeviceInfo(devOutId);
    PortMidiStream**  outStream  =  new  PortMidiStream*;
     int  hasErr  =  Pm_HasHostError(outStream); // SEGFAULT



_______________________________________________
media_api mailing list
media_api@create.ucsb.edu
http://lists.create.ucsb.edu/mailman/listinfo/media_api


_______________________________________________
media_api mailing list
media_api@create.ucsb.edu
http://lists.create.ucsb.edu/mailman/listinfo/media_api
_______________________________________________
media_api mailing list
media_api@create.ucsb.edu
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to