[Speex-dev] [PATCH] Add Visual Studio 2008 Prject files

Mikael Magnusson mikma264 at gmail.com
Tue Dec 4 02:32:50 PST 2007

Alexander Chemeris wrote:
> On 12/3/07, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:
>> I just checked and there is nothing needed in configure.ac.
>> In the Makefile.am that creates the shared library you need to add
>> "-no-undefined" to the LDFLAGS variable like this:
>> libspeex_la_LDFLAGS = -no-undefined @WHATEVER_WAS_THERE_BEFORE@
> Which symbols will it export? I think default behaviour would be to export
> all symbols, which is not good. So, is there way to pass *.def file to it?

Yes, you can add a DEF file to the linker arguments to select the 
symbols to export (-Wl,$(srcdir)/speex.def).

Another method is using function attributes, __declspec(dllexport) or 
__attribute__ ((dllexport)).

But if you want to reduce the number of exported symbols on other 
platforms as well, you need to use libtools `-export-symbols SYMFILE' or 
`-export-symbols-regex REGEX'.


More information about the Speex-dev mailing list