[Libburn] Namespace resolution

Derek Foreman manmower at signalmarketing.com
Mon Aug 2 08:01:04 PDT 2004


On Fri, 30 Jul 2004, Bryan Forbes wrote:

> I'm getting some namespace errors using libisofs.  It has to do with
> libisofs declaring functions like this:
>
> struct burn_source* iso_source_new (struct iso_volumeset *volumeset,
> 				    int volume);
>
> When I call that from a c++ application, it tells me (when compiled)
> that burn_source is ambiguous because there are now two burn_sources
> declared: one in namespace burn, and one in namespace iso.  Do we need
> the struct in front of burn_source since it is declared in libburn.h?  I
> also found this problem using iso_source_generate (I had to cast the
> return value and the burn_source).

Hah, nice.  The easiest "fix" would probably be to put burn and iso in the
same namespace.

Another option is to put the common stuff in a single .h file and include
that inside the extern "C" { part of the respective header files.

Or we could probably sprinkle millions of #ifdefs and ::s around the code.

Any objections to solution number one?  Anyone have something better??


More information about the libburn mailing list