Results 1 to 6 of 6

Thread: .pro file entry when including X11/Xlib.h

  1. #1
    Join Date
    Jun 2015
    Location
    California, USA
    Posts
    61
    Thanks
    43
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11

    Default .pro file entry when including X11/Xlib.h

    I'm trying to get the qTerminal .pro file working.
    The latest error is:

    qxtglobalshortcut_x11.o: undefined reference to symbol 'XStringToKeysym'
    I see
    Qt Code:
    1. #include <X11/Xlib.h>
    To copy to clipboard, switch view to plain text mode 
    in qxtglobalshortcut_x11.cpp

    I tried
    Qt Code:
    1. INCLUDEPATH += /usr/include/X11
    To copy to clipboard, switch view to plain text mode 
    but that didn't work.

    Does this require using LIBS?

    https://github.com/lxde/qterminal/issues/229

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: .pro file entry when including X11/Xlib.h

    Quote Originally Posted by ravas View Post
    Does this require using LIBS?
    Yes, "reference error" is a linker error, that means the compiler had already succeeded in compiling and thus in finding all includes.

    Have you tried with CMake instead?
    If that is the main build system then it is probably the one that is up to date.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    ravas (24th May 2016)

  4. #3
    Join Date
    Jun 2015
    Location
    California, USA
    Posts
    61
    Thanks
    43
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11

    Default Re: .pro file entry when including X11/Xlib.h

    No... >_<
    Is there a way to use a cmake file like a pro file in Creator?

    Edit: I just found http://doc.qt.io/qtcreator/creator-project-cmake.html

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: .pro file entry when including X11/Xlib.h

    I would think something like
    Qt Code:
    1. LIBS += -L/usr/X11/lib -lX11
    To copy to clipboard, switch view to plain text mode 
    Is a good start. The path changes from system to system, and you may be able to get by without the -L option entirely. Have a look at the output of
    Qt Code:
    1. pkg-config --cflags --lib x11
    To copy to clipboard, switch view to plain text mode 
    For more clues.

  6. The following user says thank you to ChrisW67 for this useful post:

    ravas (24th May 2016)

  7. #5
    Join Date
    Jun 2015
    Location
    California, USA
    Posts
    61
    Thanks
    43
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11

    Default Re: .pro file entry when including X11/Xlib.h

    That did it. Thanks!

    After that I also needed to add
    QT += x11extras

    https://github.com/r-a-v-a-s/qtermin...cd27de1adee0e8
    Last edited by ravas; 25th May 2016 at 00:22.

  8. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: .pro file entry when including X11/Xlib.h

    Quote Originally Posted by ravas View Post
    Is there a way to use a cmake file like a pro file in Creator?
    Yes

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 20th March 2015, 12:31
  2. Replies: 4
    Last Post: 2nd October 2013, 14:57
  3. Problem in file including.
    By Niamita in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2011, 13:15
  4. Qt Creator PROBLEM INCLUDING 'QSystemInfo' HEADER FILE
    By Rakula in forum Qt Tools
    Replies: 1
    Last Post: 24th September 2010, 10:28
  5. How to read text file including all empty spaces..
    By umulingu in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2009, 08:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.