X11 conflict? ambiguous references


#1

Hi, trying to port my JUCE app from OSX to Linux (I am very new to Linux). I’m running ubuntu and codeblocks. When I try to build my project I get several errors reading:

“error: reference to ‘____’ is ambiguous”

where ____ is Font, Time, and Drawable

These errors are occurring in /usr/include/X11/Xlib.h

and in juce_Time.h, juce_Font.h, and juce_Drawable.h I get "error: class juce::Font etc

Seems to be a conflict with namespaces. Any ideas? Thank you!


#2

Presumably you’re including the X headers after already including the juce headers. That’s not gonna work. If you really need to include X, do so before the juce headers.