On 20 Apr 2011, at 21:34, Andrew Waldrum wrote:

> I am using fltk-1.3.0rc3 on 64 bit Ubuntu 10.04.  What appears on those
> two lines are :
> 
> /usr/include/pqxx/transaction_base.hxx:331:
> 
>  enum Status
>  {
>    st_nascent,
>    st_active,
>    st_aborted,
>    st_committed,
>    st_in_doubt
>  };
> 
> and
> 
> /usr/include/pqxx/connection_base.hxx:791:
> 
> 
>  int PQXX_PRIVATE Status() const throw ();
> 
> so it is almost certainly a name collision with a definition of "Status"
> in fltk or something else fltk uses.
> Is there anything I can do about it? 
> The options to move includes around in Fluid 1.3 seem great at doing
> everything except putting an include above the default FL/FL.h in my .h
> file. 
> 
> Any help would be appreciated. 

Ok, well, I think you have a problem - the "Status" that fltk is using at this 
point is not a fltk thing, it's an X11 thing, broadly related to the handling 
of X input methods and so forth, so liberally spattered through the UTF8 code 
in fltk, e.g. in XmbLookupString() and so on...

But it comes from a C API, not a C++ one, so there's no easy way to put it into 
a namespace to keep it out of your way.

If you can change the names of your symbols, obviously that would help...

Or, use a #define to "rename" the Xlib Status on the fly in the fltk code... 
though I can't quite see how to do that without breaking your own definitions 
for Status though... 

Or something...

Note that there's a real chance that this is actually breaking your code, even 
if it appears to compile OK... If the XIM code gets triggered and the "wrong" 
prototype for Status has been compiled in to the function calls... well, you 
can see how that might go badly...

Maybe someone smarter than me will know how to tweak around this.
Duncan's suggestion of separating things out might be the way forward.






_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to