Re: function to check if a symbol in a library exists or not

  • From: Josh Simmons <simmons.44@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2012 17:23:58 +1000

On Mon, Jul 30, 2012 at 4:46 PM, Cosmin Apreutesei
<cosmin.apreutesei@xxxxxxxxx> wrote:
> Hi,
> Sometimes I need to know at runtime if a symbol is defined in a
> library or not. Take cairo for instance, which contains the
> appropriate symbols only for the backends that it was compiled with,
> and it doesn't give you a "capabilities" API to tell you which those
> backends are.

This sounds like a dodgy way to do it, would you not be better off
parsing cairo's config.h for enabled backend defines?

Other related posts: