#130 problem compiling xmovie-1.9.13 and fix

open
nobody
XMovie (10)
5
2005-10-14
2005-10-14
Anonymous
No

Make on xmovie is throwing this error:

gcc -c `cat libsndfile-1.0.5/i686/c_flags`
libsndfile-1.0.5/src/sndfile.c -o
libsndfile-1.0.5/i686/src/sndfile.o
libsndfile-1.0.5/src/sndfile.c: In function `sf_open':
libsndfile-1.0.5/src/sndfile.c:247: parse error before `*'
libsndfile-1.0.5/src/sndfile.c:250: `psf' undeclared
(first use in this function)
libsndfile-1.0.5/src/sndfile.c:250: (Each undeclared
identifier is reported only once
libsndfile-1.0.5/src/sndfile.c:250: for each function
it appears in.)
libsndfile-1.0.5/src/sndfile.c:265: `error' undeclared
(first use in this function)
make[2]: *** [libsndfile-1.0.5/i686/src/sndfile.o] Error 1

The problem is that the function sf_open is commented
out with the following code:

fprintf(stderr, "sf_open: not supported in the
Heroine Virtual hack.\n");
return 0;

which has been added before the following declarations:

SF_PRIVATE *psf ;
int error = 0 ;

since you are using gcc you need to place the
fprintf/return combo after the declarations.

Discussion