Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11348

Problems compiling Qt with X11 on Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 4.7.0
    • None
    • None

    Description

      We would like to use Qt4 (Version 4.6) together with a library, that brings in X11 headers. The OS in concern is Suse Linux 11.2, X version is Xorg 1.6.5

      Unfortunately there are preprocessor definitions in X.h and Xlib.h that clash with typedefs in Qt header files, namely

      • Status (see Xlib.h)
      • CursorShape (see X.h)

      It seems that the problem is already known at Qt and there are some workarounds made within the Qt headers to prevent the problem but not in all cases.

      Concerning the Status preprocessor definition:

      qsettings.h -> undefined Status at the beginning, which is fine
      qtextstream.h and
      qdatastream.h -> it should be done the same way there.

      qiodevice.h -> possibly there as well


      Concerning CursorShape:

      qnamespace.h -> should be undefined there
      qcursor.h -> protected, but only in the QT3 backward compatible mode (within #ifdef QT3_SUPPORT)
      Also, it should be better done right at the beginning.


      Although this in not really a problem of Qt, it would be really nice if you could make the headers save against these evil preprocessor definitions.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              dzyubenk Denis Dzyubenko (Inactive)
              dettman Dean Dettman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes