Opened 20 years ago
Closed 20 years ago
Last modified 20 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 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 by , 20 years ago
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.

fixed by [9202]