[Flac-dev] Compile problems on OSX
Erik de Castro Lopo
erikd-flac at mega-nerd.com
Sun Sep 9 13:43:04 PDT 2007
Josh Coalson wrote:
> the main reason I haven't swtiched is I'm not up on pkgconfig
> and XIPTH_PATH_OGG has been working pretty well... can you tell
> why it's not working for you?
>
> I'm always hesitant to mess with things in configure.in because
> is such whack-a-mole problem (fixes things for some people and
> breaks for others).
I'll look into that over the next day or so. The pkg-config method
has the advantage of being highly robust, but is a pain for MinGW
because you need pkg-config.
> > Second problem is that I get a compile error when FLAC__HAS_OGG is 0
> > in src/flac/decode.c:
> >
> > decode.c:393: error: 'options' undeclared (first use in this
> > function)
> >
> > The code in question is this:
> >
> > #if FLAC__HAS_OGG
> > if(decoder_session->is_ogg) {
> > /* Some code here. */
> > }
> > else
> > #else
> > (void)decode_options;
> > #endif
> > {
> > /* More code. */
> > }
>
> yes, this is fixed in cvs. actually I'll probably be doing a
> release soon and I'd be interested to know if the latest stuff
> works for you.
Sorry, I just updated from CVS and its still broken. If FLAC__HAS_OGG
is false it tries to compile this:
(void)decode_options;
and there is no "decode_options" identifier.
Maybe this is the delay between your CVS commit and the public CVS
being updated.
> interesting idea, hadn't thought of that.
Please take a look at this. Doing it this way means that both code
paths are checked by the semantic analysis stage of the compiler
regardless of value of FLAC__HAS_OGG. It prevents conditional compile
constructs from hiding really blatantly obvious errors like this one.
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"Whenever the C++ language designers had two competing ideas as to
how they should solve some problem, they said, "OK, we'll do them
both". So the language is too baroque for my taste." -- Donald E Knuth
More information about the Flac-dev
mailing list