Embedding, Symbols.ev, and static symbols

ghudson at MIT.EDU ghudson at MIT.EDU
Thu Aug 25 17:00:31 CEST 2011

I'm using libev within another library.  I'm not re-exporting the
libev API, just using it within the library (which is a single source
file, directly wrapping ev.c).  To avoid leaking libev symbols into
the library namespace, I'm currently renaming the symbols according to
the directions in the embedding documentation.  I have two notes about
libev's excellent EV_STANDALONE support.

First, Symbols.ev doesn't appear to be included in the tarfile, so I
had to grab it from the source repository at the appropriate tag.
Since the documentation refers to Symbols.ev and Symbols.event, I
would think they should be included in the release.

Second, I wouldn't need to rename symbols if libev had a way to define
its API functions as statics.  It would be nice to have support for
something like "#define EV_STATIC_API 1", so I wouldn't need to have a
generated header file in my build system.

Thanks for the excellent work.

More information about the libev mailing list