Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1417 closed defect (fixed)

build error: /usr/include/X11/X.h and /usr/include/qt3/qdir.h both use "Unsorted"

Reported by: Robert Tsai <rtsai1111> Owned by: Isaac Richards
Priority: major Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

/usr/include/X11/X.h has #define Unsorted 0 /usr/include/qt3/qdir.h does enum ... Unsorted = 0x03

These collide in mythfrontend/globalsettings.cpp when USING_XV was turned on in [9201] (X.h gets pulled in via util-x11.h). Other files include this same pair of header files, but they don't have a USING_XV in their qmake project file.

My linux distribution is Ubuntu Breezy (libx11-dev 6.2.1+cvs.20050722-8; libqt3-headers 3.3.4-8ubuntu5).

For now, I just re-ordered the #include's in globalsettings.cpp, but there should probably be some kind of more permanent fix ...

Change History (2)

comment:1 Changed 14 years ago by Robert Tsai <rtsai1111>

Resolution: fixed
Status: newclosed

fixed by [9202]

comment:2 Changed 14 years ago by jcaputo1 at comcast.net

This is a known problem with Qt/X11. Trolltech recommends that Qt headers always be included before X11 headers; however, in practice this is not a perfect solution, and sometimes requires including unnecessary Qt headers in a source file just to circumvent name conflicts. There's really not much else you can do.

Bottom line: this is why #defines are evil for anything other than conditional compilation.

Note: See TracTickets for help on using tickets.