Index: /libmpc/trunk/include/mpc/mpc_types.h
===================================================================
--- /libmpc/trunk/include/mpc/mpc_types.h	(revision 399)
+++ /libmpc/trunk/include/mpc/mpc_types.h	(revision 400)
@@ -127,4 +127,8 @@
 #endif
 
+#ifdef __GNUC__
+# define MPC_API __attribute__ ((visibility("default")))
+#endif
+
 #ifdef __cplusplus
 }
Index: /libmpc/trunk/include/mpc/mpcdec.h
===================================================================
--- /libmpc/trunk/include/mpc/mpcdec.h	(revision 399)
+++ /libmpc/trunk/include/mpc/mpcdec.h	(revision 400)
@@ -40,4 +40,5 @@
 #endif
 
+#include "reader.h"
 #include "streaminfo.h"
 
@@ -66,8 +67,8 @@
 /// \param si streaminfo structure indicating format of source stream
 /// \return pointer on the initialized decoder structure if successful, 0 if not
-mpc_decoder * mpc_decoder_init(mpc_streaminfo *si);
+MPC_API mpc_decoder * mpc_decoder_init(mpc_streaminfo *si);
 
 /// Releases input mpc decoder
-void mpc_decoder_exit(mpc_decoder *p_dec);
+MPC_API void mpc_decoder_exit(mpc_decoder *p_dec);
 
 /**
@@ -76,7 +77,7 @@
  * @param scale_factor multiplicative scaling factor
  */
-void mpc_decoder_scale_output(mpc_decoder *p_dec, double scale_factor);
+MPC_API void mpc_decoder_scale_output(mpc_decoder *p_dec, double scale_factor);
 
-void mpc_decoder_decode_frame(mpc_decoder * d, mpc_bits_reader * r, mpc_frame_info * i);
+MPC_API void mpc_decoder_decode_frame(mpc_decoder * d, mpc_bits_reader * r, mpc_frame_info * i);
 
 // This is the gain reference used in old replaygain
@@ -88,7 +89,7 @@
  * @return an initialized mpc_demux pointer
  */
-mpc_demux * mpc_demux_init(mpc_reader * p_reader);
+MPC_API mpc_demux * mpc_demux_init(mpc_reader * p_reader);
 /// free demuxer
-void mpc_demux_exit(mpc_demux * d);
+MPC_API void mpc_demux_exit(mpc_demux * d);
 /**
  * Calls mpc_decoder_scale_output to set the scaling factor according to the
@@ -100,17 +101,17 @@
  * @param clip_prevention MPC_TRUE : uses cliping prevention
  */
-void mpc_set_replay_level(mpc_demux * d, float level, mpc_bool_t use_gain,
+MPC_API void mpc_set_replay_level(mpc_demux * d, float level, mpc_bool_t use_gain,
                           mpc_bool_t use_title, mpc_bool_t clip_prevention);
 /// decode frame
-mpc_status mpc_demux_decode(mpc_demux * d, mpc_frame_info * i);
+MPC_API mpc_status mpc_demux_decode(mpc_demux * d, mpc_frame_info * i);
 /// get streaminfo
-void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i);
+MPC_API void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i);
 /// seeks to a given sample
-mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample);
+MPC_API mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample);
 /// seeks to a given second
-mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds);
+MPC_API mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds);
 
 /// \return the current position in the stream (in bits) from the beginning of the file
-mpc_seek_t mpc_demux_pos(mpc_demux * d);
+MPC_API mpc_seek_t mpc_demux_pos(mpc_demux * d);
 
 /// chapters : only for sv8 streams
@@ -120,5 +121,5 @@
  * @return the number of chapters found in the stream
  */
-mpc_int_t mpc_demux_chap_nb(mpc_demux * d);
+MPC_API mpc_int_t mpc_demux_chap_nb(mpc_demux * d);
 /**
  * Gets datas associated to a given chapter
@@ -131,5 +132,5 @@
  * @return the sample where the chapter starts
  */
-mpc_uint64_t mpc_demux_chap(mpc_demux * d, int chap_nb, char ** tag, mpc_uint_t * tag_size);
+MPC_API mpc_uint64_t mpc_demux_chap(mpc_demux * d, int chap_nb, char ** tag, mpc_uint_t * tag_size);
 
 #ifdef __cplusplus
Index: /libmpc/trunk/include/mpc/reader.h
===================================================================
--- /libmpc/trunk/include/mpc/reader.h	(revision 399)
+++ /libmpc/trunk/include/mpc/reader.h	(revision 400)
@@ -79,5 +79,5 @@
 /// \param r p_reader handle to initialize
 /// \param filename input filename to attach to the reader
-mpc_status mpc_reader_init_stdio(mpc_reader *p_reader, const char *filename);
+MPC_API mpc_status mpc_reader_init_stdio(mpc_reader *p_reader, const char *filename);
 
 /// Initializes reader with default stdio file reader implementation.  Use
@@ -86,10 +86,10 @@
 /// \param r p_reader handle to initialize
 /// \param p_file input file handle (already open)
-mpc_status mpc_reader_init_stdio_stream(mpc_reader * p_reader, FILE * p_file);
+MPC_API mpc_status mpc_reader_init_stdio_stream(mpc_reader * p_reader, FILE * p_file);
 
 /// Release reader with default stdio file reader implementation.
 ///
 /// \param r reader handle to release
-void mpc_reader_exit_stdio(mpc_reader *p_reader);
+MPC_API void mpc_reader_exit_stdio(mpc_reader *p_reader);
 
 #ifdef __cplusplus
Index: /libmpc/trunk/include/mpc/streaminfo.h
===================================================================
--- /libmpc/trunk/include/mpc/streaminfo.h	(revision 399)
+++ /libmpc/trunk/include/mpc/streaminfo.h	(revision 400)
@@ -40,5 +40,4 @@
 
 #include <mpc/mpc_types.h>
-#include "reader.h"
 
 #ifdef __cplusplus
@@ -99,9 +98,9 @@
 /// Gets length of stream si, in seconds.
 /// \return length of stream in seconds
-double mpc_streaminfo_get_length(mpc_streaminfo *si);
+MPC_API double mpc_streaminfo_get_length(mpc_streaminfo *si);
 
 /// Returns length of stream si, in samples.
 /// \return length of stream in samples
-mpc_int64_t mpc_streaminfo_get_length_samples(mpc_streaminfo *si);
+MPC_API mpc_int64_t mpc_streaminfo_get_length_samples(mpc_streaminfo *si);
 
 #ifdef __cplusplus
Index: /libmpc/trunk/libmpcdec/Makefile.am
===================================================================
--- /libmpc/trunk/libmpcdec/Makefile.am	(revision 399)
+++ /libmpc/trunk/libmpcdec/Makefile.am	(revision 400)
@@ -13,2 +13,3 @@
 
 noinst_HEADERS = mpc_bits_reader.h
+AM_CFLAGS = -fpic -fvisibility=hidden
Index: /libmpc/trunk/libmpcdec/mpc_bits_reader.h
===================================================================
--- /libmpc/trunk/libmpcdec/mpc_bits_reader.h	(revision 399)
+++ /libmpc/trunk/libmpcdec/mpc_bits_reader.h	(revision 400)
@@ -35,5 +35,5 @@
 #define MAX_ENUM 32
 
-int mpc_bits_get_block(mpc_bits_reader * r, mpc_block * p_block);
+MPC_API int mpc_bits_get_block(mpc_bits_reader * r, mpc_block * p_block);
 mpc_int32_t mpc_bits_golomb_dec(mpc_bits_reader * r, const mpc_uint_t k);
 unsigned int mpc_bits_get_size(mpc_bits_reader * r, mpc_uint64_t * p_size);
Index: /libmpc/trunk/libmpcdec/mpc_demux.c
===================================================================
--- /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 399)
+++ /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 400)
@@ -157,5 +157,5 @@
  * @return MPC_STATUS_FILE on errors of any kind
  */
-mpc_int32_t mpc_demux_skip_id3v2(mpc_demux * d)
+static mpc_int32_t mpc_demux_skip_id3v2(mpc_demux * d)
 {
 	mpc_uint8_t  tmp [4];
@@ -203,5 +203,5 @@
 }
 
-mpc_status mpc_demux_seek_init(mpc_demux * d)
+static mpc_status mpc_demux_seek_init(mpc_demux * d)
 {
 	if (d->seek_table != 0)
Index: /libmpc/trunk/mpc2sv8/Makefile.am
===================================================================
--- /libmpc/trunk/mpc2sv8/Makefile.am	(revision 399)
+++ /libmpc/trunk/mpc2sv8/Makefile.am	(revision 400)
@@ -1,6 +1,9 @@
 INCLUDES = -I$(top_srcdir)/include
+
+common_sources = ../common/crc32.c
+
 METASOURCES = AUTO
 bin_PROGRAMS = mpc2sv8
-mpc2sv8_SOURCES = mpc2sv8.c
+mpc2sv8_SOURCES = mpc2sv8.c $(common_sources)
 mpc2sv8_LDADD = -lm \
 	$(top_builddir)/libmpcdec/libmpcdec.la \
Index: /libmpc/trunk/mpcchap/Makefile.am
===================================================================
--- /libmpc/trunk/mpcchap/Makefile.am	(revision 399)
+++ /libmpc/trunk/mpcchap/Makefile.am	(revision 400)
@@ -1,5 +1,5 @@
 bin_PROGRAMS = mpcchap
 
-common_sources = ../common/tags.c
+common_sources = ../common/tags.c ../common/crc32.c
 
 INCLUDES = -I$(top_srcdir)/include -I/home/nico/src/cuetools-1.3.1/
Index: /libmpc/trunk/mpccut/Makefile.am
===================================================================
--- /libmpc/trunk/mpccut/Makefile.am	(revision 399)
+++ /libmpc/trunk/mpccut/Makefile.am	(revision 400)
@@ -1,6 +1,9 @@
 INCLUDES = -I$(top_srcdir)/include
+
+common_sources = ../common/crc32.c
+
 METASOURCES = AUTO
 bin_PROGRAMS = mpccut
-mpccut_SOURCES = mpccut.c
+mpccut_SOURCES = mpccut.c $(common_sources)
 mpccut_LDADD = $(top_builddir)/libmpcenc/libmpcenc.a \
 	$(top_builddir)/libmpcdec/libmpcdec.la -lm
