Re: [ecasound] Something's badly wrong with ecasound!

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] Something's badly wrong with ecasound!
From: Junichi Uekawa (dancer_AT_netfort.gr.jp)
Date: Tue Jan 08 2002 - 06:46:19 EET


On Mon, 7 Jan 2002 20:03:45 -0500
"S. Massy" <theanaloguekid_AT_tak.net.dhis.org> wrote:
> > Are you sure your program is a C program compiled with gcc ?
> > If that is the case, it might be a problem on the libecasoundc side.
> Try compiling the C ECI example in ecasound's tree and see for
> yourself... If you don't link against libstdc++ you get all sorts of
> whining about undefined references to common functions; for example:
> "/usr/local/lib/libecasound.so: undefined reference to `cout'"

I believe that this is caused by "not making libs depend on each other as
it should be".

Because the C++ program (libecasound, libkvutils) is being linked,
you need to use g++ to link. I have an impression that it was not a problem when
the C program was only explicitly linked with libecasoundc.

However, I've got an impression that libecasoundc itself is a c++ program,
and the linking needs to be performed using g++.

Like this:

$ libtool c++ ecidoc_example.c ../libecasoundc/libecasoundc.la -o a.out -I.
c++ ecidoc_example.c -o .libs/a.out -I. ../libecasoundc/.libs/libecasoundc.so /home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so /home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/kvutils/.libs/libkvutils.so -ldl -lm -lpthread -Wl,--rpath -Wl,/usr/local/lib
creating a.out

whereas using cc will result in :

$ libtool cc ecidoc_example.c ../libecasoundc/libecasoundc.la -o a.out -I.
cc ecidoc_example.c -o .libs/a.out -I. ../libecasoundc/.libs/libecasoundc.so /home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so /home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/kvutils/.libs/libkvutils.so -ldl -lm -lpthread -Wl,--rpath -Wl,/usr/local/lib
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `cerr'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `fstreambase::close(void)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `endl(ostream &)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::operator<<(long)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ios virtual table'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ofstream::~ofstream(void)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::operator<<(double)'
../libecasoundc/.libs/libecasoundc.so: undefined reference to `__out_of_range(char const *)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::flush(void)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::operator<<(long long)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `istream::ios virtual table'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ofstream::ios virtual table'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::operator<<(char const *)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ifstream::~ifstream(void)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::operator<<(int)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::operator<<(unsigned int)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::ios virtual table'
../libecasoundc/.libs/libecasoundc.so: undefined reference to `__length_error(char const *)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ostream::write(char const *, int)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `fstreambase::fstreambase(int, char const *, int, int)'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `ifstream::ios virtual table'
/home/dancer/DEBIAN/ecasound/cvs/ecasound/sound/ecasound/libecasound/.libs/libecasound.so: undefined reference to `cout'
collect2: ld returned 1 exit status

I was trying to test the following to see if it helps at all:

--- ecasound-orig/libecasound/Makefile.am Tue Jan 8 10:49:52 2002
+++ ecasound/libecasound/Makefile.am Tue Jan 8 12:37:22 2002
@@ -272,10 +272,10 @@
 
 libecasound_la_SOURCES = $(ecasound_common_src)
 libecasound_debug_la_SOURCES = $(ecasound_common_src)
-libecasound_la_LIBADD =
+libecasound_la_LIBADD = $(top_builddir)/kvutils/libkvutils.la
 libecasound_la_LDFLAGS = -export-dynamic $(eca_ldflags)
 libecasound_debug_la_LDFLAGS = $(libecasound_la_LDFLAGS)
-libecasound_debug_la_LIBADD =
+libecasound_debug_la_LIBADD = $(top_builddir)/kvutils/libkvutil_debug.la
 
--- ecasound-orig/libecasoundc/Makefile.am Wed Dec 19 19:08:24 2001
+++ ecasound/libecasoundc/Makefile.am Tue Jan 8 10:55:47 2002
@@ -47,10 +47,10 @@
 # ----------------------------------------------------------------------
 
 libecasoundc_la_SOURCES = $(ecasoundc_src)
-libecasoundc_la_LIBADD =
+libecasoundc_la_LIBADD = $(top_builddir)/libecasound/libecasound.la
 libecasoundc_la_LDFLAGS = -export-dynamic $(eca_ldflags)
 libecasoundc_debug_la_SOURCES = $(libecasoundc_la_SOURCES)
-libecasoundc_debug_la_LIBADD =
+libecasoundc_debug_la_LIBADD = $(top_builddir)/libecasound/libecasound_debug.la

 libecasoundc_debug_la_LDFLAGS = $(libecasoundc_la_LDFLAGS)
 

regards,
        junichi

-- 
dancer_AT_debian.org  http://www.netfort.gr.jp/~dancer

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jan 08 2002 - 06:36:35 EET