Re: IceSound compile error 1.0.8-6
Brought to you by:
captnmark
From: <le...@fu...> - 2001-05-24 21:25:56
|
> > Can you give me a list on what your code expects or what you believe the > > problem resides at? Is in the Y2 header files? > > Simply read gcc's output and have a look into 2.12.1's header > files... Well, let me do it for you... > > > > icesound.cc:602: warning: passing `const char *' as argument 2 of > `YOpenConnection(char *, char *)' discards const [...] > > Y2/Ylib.h:259-262: > extern YConnection *YOpenConnection( > const char *start_arg, /* Can be NULL for don't start if > needed. */ > const char *con_arg /* Can be NULL for default address and > port. */ > ); This was not the error that I got though, the error that I sent earlied talked about `cannot inline' certain functions. However what you described above is consistent, the inputs are const char * inputs and the compiler complains that they are not? I'm not sure I *understand* this error. It looks like that you expect non-const inputs, is that correct? If so how do we fix that? > icesound.cc:694: `struct YEventSoundPlay' has no member named `flags' Clearly in Y2/Ylib.h there is a member: unsigned long flags; In YEventSoundPlay. > Y2/Ylib.h:115-141: > typedef struct { > > /* These flag definations need to match those of the server. */ > #define YPlayValuesFlagYID (1 << 1) > #define YPlayValuesFlagPosition (1 << 2) > #define YPlayValuesFlagLength (1 << 3) > #define YPlayValuesFlagRepeats (1 << 4) > #define YPlayValuesFlagTotalRepeats (1 << 5) > #define YPlayValuesFlagVolume (1 << 6) > #define YPlayValuesFlagSampleRate (1 << 7) > > unsigned long flags; > > YID yid; > > YDataPosition position; /* Current play position in > bytes. */ > YDataLength length; /* Length of audio data in > bytes. */ > > int repeats, /* Number of repeats so far. */ > total_repeats; /* Total number of repeats. */ > > Coefficient left_volume, /* Volume from 0.0 to 1.0. */ > right_volume; > > int sample_rate; /* Applied sample rate in Hz. */ > > } YEventSoundPlay; Right...? Why is the compiler not detecting those members? > icesound.cc:703: warning: passing `const char *' as argument 2 of > `YStartPlaySoundObject(YConnection *, char *, YDataPosition, Coefficient, > Coefficient, int)' discards const > icesound.cc:703: warning: passing `YEventSoundPlay *' to argument 3 of > `YStartPlaySoundObject(YConnection *, char *, YDataPosition, Coefficient, > Coefficient, int)' lacks a cast > /usr/include/Y2/Ylib.h:284: too few arguments to function `YID > YStartPlaySoundObject(struct YConnection *, char *, YDataPosition, > Coefficient, Coefficient, int)' > icesound.cc:703: at this point in file > > Y2/Ylib.h:313-317: > > extern YID YStartPlaySoundObject( > YConnection *con, > const char *path, /* Path on disk on server's computer. */ > YEventSoundPlay *value > ); This is similar to the first problem... why does it want a non-const input? > Hmm... Need a new mouse now, after that much copy'n'paste... ;-) But > I hope that you accept this as prove for my statement that _you_ broke the > interface (aka. header files) of Y2. Matias, I honestly don't see this as any evidence of something wrong in Y2's header files, I only see gcc saying one thing and the Y header files saying another. Could you please elaborate? |