Thanks. OK, I've got libcdio to compile with MinGW but now I've got a new
problem. I have a Visual Studio project which links to libcdio and when I
try to compile it, I get these errors:

error LNK2019: unresolved external symbol __alloca referenced in function
_mmc_mode_sense    libcdio.a
error LNK2019: unresolved external symbol _snprintf referenced in function
_mmc_audio_read_subchannel    libcdio.a

Do you know what libraries I need to include to get __alloca and _snprintf?
I tried msvcrt.lib (which is where I though _snprintf was) but it didn't
work.


On 8/5/07, R. Bernstein <[EMAIL PROTECTED]> wrote:
>
> Scott Peterson writes:
> > I'm trying to compile libcdio-0.78.2 with MinGW. Autoconf runs fine, but
> > when I run make, I get this:
> >
> > > _cdio_generic.c:45:25: cdio/sector.h: No such file or directory
> >
> > followed by a few other "No such file" errors for a few other headers,
> and
> > then a load of errors which I guess are the result of the unfound
> headers. I
> > have those header files in the proper location, but why doesn't make
> find
> > them? Anyone have any ideas?
> >
>
> I may as well put in a plug for the GNU Make debugger, remake
> (http://bashdb.sf.net/remake), since that's in fact what I just used
> to help me see how things work when they do work.
>
> In the session below, I first removed the object I wanted to have
> "make" rebuild.  I then ran the GNU make debugger "continue"ing up to
> that target I'm interested in. (One could also set a breakpoint or
> "next" until you get to the right target)
>
> Then I get the command that's about to be run and examine variables
> which make up that command and the part of that command that contains
> the includes flags that are needed here. I selected variable INCLUDE
> because I happen to suspect that this is where to look. But if I
> didn't I'd just "print" or "expand" the variables one at a time.
>
> All of this tells me that the proper include is set by LIBCDIO_CFLAGS
> on line 217 of the libcdio/lib/driver/Makefile which really comes from
> line 106 of lib/driver/Makefile.am:
>
>   INCLUDES = $(LIBCDIO_CFLAGS)
>
> Also, top_srcdir has to be set properly.
>
> $ cd libcdio/lib/
> $ rm _cdio_generic.o
>
> remake -X _cdio_generic.o
> Reading makefiles...
> (:0):
> expr 8 - 1
> Updating makefiles....
>
> (libcdio/lib/driver/Makefile:426)
> Makefile.in:
> mdb<0> c _cdio_generic.o
> Updating goal targets....
> File `_cdio_generic.o' does not exist.
> Must remake target `_cdio_generic.o'.
>
> (/src/external-cvs/libcdio/lib/driver/Makefile:524)
> _cdio_generic.o: _cdio_generic.c _cdio_generic.c ../../config.h ...
> mdb<1> t @ commands
>
> _cdio_generic.o:
> #  commands to execute (from `Makefile', line 525):
>    if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
>    then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f
> "$(DEPDIR)/$*.Tpo"; exit 1; fi
>
> mdb<2> p COMPILE
> Makefile:116 (origin: makefile) COMPILE = $(CC) $(DEFS)
> $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
> $(CFLAGS)
> mdb<3> p INCLUDES
> Makefile:360 (origin: makefile) INCLUDES = $(LIBCDIO_CFLAGS)
> mdb<4> p LIBCDIO_CFLAGS
> Makefile:217 (origin: makefile) LIBCDIO_CFLAGS =
> -I$(top_srcdir)/lib/driver -I$(top_srcdir)/include/
> mdb<5> p top_srcdir
> Makefile:64 (origin: makefile) top_srcdir = ../..
>
>
>
> _______________________________________________
> Libcdio-devel mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/libcdio-devel
>



-- 
Scott.
_______________________________________________
Libcdio-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/libcdio-devel

Reply via email to