Results 1 to 20 of 28

Thread: QT minimum build to start developing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT minimum build to start developing

    I'm sure everybody understands "minimum build" in his own way. Here is how i do my minimum build (e.g. Qt 4.5.2).

    Qt Code:
    1. ./configure -prefix /usr/local/qt-4.5.2 -nomake demos -nomake examples -no-qt3support
    2. -no-accessibility -no-phonon -no-phonon-backend -no-webkit
    To copy to clipboard, switch view to plain text mode 

    But it may differ from your needs, because i don't know what kind of application you want to develop.
    I'm a rebel in the S.D.G.

  2. #2
    Join Date
    Aug 2009
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT minimum build to start developing

    Quote Originally Posted by lyuts View Post
    I'm sure everybody understands "minimum build" in his own way. Here is how i do my minimum build (e.g. Qt 4.5.2).

    Qt Code:
    1. ./configure -prefix /usr/local/qt-4.5.2 -nomake demos -nomake examples -no-qt3support
    2. -no-accessibility -no-phonon -no-phonon-backend -no-webkit
    To copy to clipboard, switch view to plain text mode 

    But it may differ from your needs, because i don't know what kind of application you want to develop.
    I'm building in Windows targetting to VS2005, and -prefix is not listed in configure help: what is it for?

    Anyway my meaning for "minimum" is the smallest set of files needed to develop an application (with all the possible libraries) using the VS2005 integration.
    So I think I would:
    - need folders 'include', 'lib', 'plugins' and 'bin'
    - not need folders 'src', 'examples', 'tutorials', 'demos'
    - don't know about remaining files and folders

    Am I correct?
    Last edited by lurky; 26th August 2009 at 15:19.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing

    Quote Originally Posted by lurky View Post
    Of course I did NOT changed the libraries code but just played with makefiles.
    Makefiiles get regenerated when you run configure.

    But for safety reasons I reinstalled the SDK.
    Pure waste of time, especially that the SDK is built for MinGW.

    Now, how can I just build WebKit?
    Giving information that you encountered some error isn't really helpful. I could only reply you needed to do something to make them go away.

    Quote Originally Posted by lurky View Post
    I'm building in Windows targetting to VS2005, and -prefix is not listed in configure help: what is it for?
    It's for installing the binaries outside the source tree. But it's unavailable on Windows.

    Anyway my meaning for "minimum" is the smallest set of files needed to develop an application (with all the possible libraries) using the VS2005 integration.
    You need to build the sub-src, sub-tools and possibly the plugins targets then.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Aug 2009
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT minimum build to start developing

    Quote Originally Posted by wysota View Post
    Pure waste of time, especially that the SDK is built for MinGW.
    But I need all the SDK to have designer, linguist and other tools. Correct?

    Quote Originally Posted by wysota View Post
    Giving information that you encountered some error isn't really helpful. I could only reply you needed to do something to make them go away.
    You're absolutely right, unfortunately I did not take a note of the exact error but if there's a way to build just WebKit I can make a fast try.

    Quote Originally Posted by wysota View Post
    You need to build the sub-src, sub-tools and possibly the plugins targets then.
    How can I achieve this?
    What about my assumption about minimum set of required files/folders?

    Thank you for you answers.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing

    Quote Originally Posted by lurky View Post
    But I need all the SDK to have designer, linguist and other tools. Correct?
    Incorrect.

    You're absolutely right, unfortunately I did not take a note of the exact error but if there's a way to build just WebKit I can make a fast try.
    Configure with WebKit, cd into appropriate directory and run nmake. Note that Qt libraries need to be compiled first.

    How can I achieve this?
    Call nmake with appropriate target names (such as sub-src).

    What about my assumption about minimum set of required files/folders?
    What about it?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Aug 2009
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT minimum build to start developing (built and copied on a new pc)

    Update.
    Uninstalled the SDK, downloaded the
    qt-win-opensource-src-4.5.2.zip
    package, made configure and then nmake.
    Building was completed with no errors.
    Finally I got a fully working installation of QT with VS2005 integration on the machine I used to build...

    but

    ...I then took the whole 'qt' folder to a different machine (let's say %BUILD_PATH% is were libraries were built and %NEW_PATH% is were they are located on the other machine), configured there the %QTDIR% = %NEW_PATH%, added %QTDIR%\bin to the %path%, and I'm able to open/create QT projects with the suitable 'qt designer'; the only problem is that if I try to open the help I got the error
    "The binary '%BUILD_PATH%\bin\assistant.exe' does not exist."

    How can I fix this?

    The question in my previous post would mean: once I got the full built libraries which are the files needed to develop QT applications? (I think I should not need folders 'src', 'examples', 'tutorials', 'demos'.....)

    Thanks.
    Last edited by lurky; 27th August 2009 at 14:29.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing (built and copied on a new pc)

    You can't move an existing installation to a different path without recompilation (or patching the binaries).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: QT minimum build to start developing (built and copied on a new pc)

    Quote Originally Posted by wysota View Post
    You can't move an existing installation to a different path without recompilation (or patching the binaries).
    You can, just need create qt.conf file with new path.

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing (built and copied on a new pc)

    As far as I know qt.conf doesn't apply to qmake. Or does it?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: QT minimum build to start developing (built and copied on a new pc)

    Quote Originally Posted by wysota View Post
    As far as I know qt.conf doesn't apply to qmake. Or does it?
    Does it. Try for yourself. Rename %QTDIR% root directory to other name, next go to new %QTDIR%/bin and create inside - file qt.conf with this content:
    Qt Code:
    1. [Paths]
    2. Prefix=full_path_name_to_new_root_Qt_directory
    To copy to clipboard, switch view to plain text mode 

    Then open terminal, compiling any Qt project.

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT minimum build to start developing (built and copied on a new pc)

    It doesn't work. It still points to the original path.
    bash Code:
    1. export QTDIR=/tmp
    2. mkdir /tmp/bin
    3. echo "[Paths]" > /tmp/bin/qt.conf
    4. echo "Prefix=/opt/" >> /tmp/bin/qt.conf
    5. mkdir /tmp/testbed
    6. cd /tmp/testbed
    7. touch main.cpp
    8. qmake -project
    9. qmake
    10. make
    To copy to clipboard, switch view to plain text mode 

    Result:
    g++ -c -pipe -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include -I. -I. -o main.o main.cpp
    g++ -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -o testbed main.o -L/usr/lib -lQtGui -L/usr/lib -pthread -lpng -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
    As for me if it worked, it should have complained about missing specs but it's still seeing my installation at /usr/lib/qt4.

    Even after linking qmake to /tmp/bin/qmake:
    $ ./qmake -v
    QMake version 2.01a
    Using Qt version 4.5.2 in /usr/lib

    and:
    $ env|grep QTDIR
    QTDIR=/tmp

    Am I doing something wrong?

    I think that if it was that simple, Qt installation script wouldn't be patching qmake binaries.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: QT minimum build to start developing

    Quote Originally Posted by wysota View Post
    It doesn't work. It still points to the original path.
    bash Code:
    1. echo "Prefix=/opt/" >> /tmp/bin/qt.conf
    To copy to clipboard, switch view to plain text mode 
    You must write

    bash Code:
    1. echo "Prefix=/tmp" >> /tmp/bin/qt.conf
    To copy to clipboard, switch view to plain text mode 

    Not "/opt/"

    I don't try this on non windows machine. I think on your OS you also need modify PATH variable for founding correct qmake. It from my batch script on windows:

    bash Code:
    1. set QTDIR=D:\Work\qt-all-opensource-src-4.5.2_gcc440
    2. set PATH=%QTDIR%/bin
    To copy to clipboard, switch view to plain text mode 

    So, i know what qmake has been called from QTDIR/bin path.
    Last edited by SABROG; 10th September 2009 at 06:50.

Similar Threads

  1. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 13:18

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.