Re: On the cost of libraries



on 9/1/01 3:48 PM, Havoc Pennington at hp redhat com wrote:

> See GTK - use libtool:
> 
> # libtool option to control which symbols are exported
> # right now, symbols starting with _ are not exported
> LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
> AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
> 
> We make private symbols start with _, but if you didn't want to do
> that you can also have a file where you make a list of private
> symbols. libtool just uses the regexp to generate the file.

My own personal taste would be to generate the list of symbols to export
from a simple-minded "parse" of the public headers and make everything else
private. It seems like it might be straightforward to come up with a way to
do this that could be reused in various libraries.

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]