Results 1 to 8 of 8

Thread: Qt 4.3.3 - Server build without QtGui?

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    52
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt 4.3.3 - Server build without QtGui?

    Hi,

    I was wondering how I can tell the Qt configure script to exclude the QtGui module from the build process. I try to build Qt 4.3.3. on a server without X11 on it. The build does fail because of missing X11 header files, which I do not want to install on my server.

    So far I have not been able to find a configure switch that would allow me to build Qt without QtGui... can anyone help?

    Regards,
    Michael

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt 4.3.3 - Server build without QtGui?

    As you have noticed, QtCore and QtGui are enabled by default. This means that the QT variable contains "core" and "gui" by default. So remove "gui" in a way or other:
    Qt Code:
    1. QT = core # take core alone in use, removes everything else
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. QT -= gui # remove gui from whatever modules there are enabled
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. QT = core network # take core and network in use
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.3.3 - Server build without QtGui?

    jpn, I believe he's trying to compile Qt on a computer that does not have x11. I don't think you can get it past the configure phase in this situation. There's no configure option to tell it not to build the GUI. I don't think anyone has ever needed it like this.

    Maybe you tweak the configure script to skip all x11 related tests and then take the GUI module out of the makefile?

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    52
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.3.3 - Server build without QtGui?

    Quote Originally Posted by marcel View Post
    I believe he's trying to compile Qt on a computer that does not have x11. I don't think you can get it past the configure phase in this situation.
    You are right. That's what I try to do. And I haven't found any:

    ./configure -no-qtgui switch or something like that.

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt 4.3.3 - Server build without QtGui?

    Oops, sorry. After configuring, try:
    Qt Code:
    1. make -C src sub-corelib
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.3.3 - Server build without QtGui?

    Quote Originally Posted by jpn View Post
    Oops, sorry. After configuring, try:
    Qt Code:
    1. make -C src sub-corelib
    To copy to clipboard, switch view to plain text mode 
    That must work... But he first needs to modify configure to skip all X11 related tests.

  7. #7
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt 4.3.3 - Server build without QtGui?

    I did it modifying the .pro files in qt source directory.
    I added SUBDIRS -= gui to $QTDIR/src/src.pro, SUBDIRS -= iconengines imageformats inputmethod styles to $QTDIR/src/plugins/plugins.pro, and some more in $QTDIR/tools directory (for example SUBDIRS -= assistant designer linguist to tools.pro).

    Then configure as usual, and make.
    If you get errors, you should only find out what subdir needs to be excluded by compilation.

    This way I got Qt working with network, sql, xml modules.

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt 4.3.3 - Server build without QtGui?

    Quote Originally Posted by marcel View Post
    That must work... But he first needs to modify configure to skip all X11 related tests.
    Does he? Doesn't configure look for X extensions? As far as I remember they're not mandatory. And there are a bunch of -no-xthis and -no-xthat switches too...
    J-P Nurmi

Similar Threads

  1. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 13:18
  2. Build an HTTP server
    By the_bis in forum Qt Programming
    Replies: 4
    Last Post: 30th March 2007, 07:36

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.