Results 1 to 9 of 9

Thread: QT3/QT4 Simultaneous

  1. #1
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QT3/QT4 Simultaneous

    Hello!

    I am currently trying to build QT 3.3 and QT4.7 projects on the same machine and wondering how this can be done. I tried to add the QT4 path at the end of QMAKESPEC in the system environment variables after QT3 (not sure if that is even allowed) but no luck when building QT3 or QT4. When I removed QT4's mkspec path QT3 builds correctly. Any ideas? I'm also getting these errors when removing QT3's paths and just having QT4's:
    Qt Code:
    1. Error processing project file:
    2. QFile::open: No file name specified
    3. QDir::readDirEntries: Cannot read the directory: /mkspecs (UTF8)
    4. qt_config.prf:10: include(file) requires one argument.
    5. qt_config.prf:11: Unknown test function: debug
    6. qt_functions.prf:1: Unknown test function: defineReplace
    7. qt_functions.prf:18: Unknown test function: defineTest
    8. qt_functions.prf:91: Unknown test function: defineTest
    To copy to clipboard, switch view to plain text mode 

    Any help would be great! Thanks!

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

    Default Re: QT3/QT4 Simultaneous

    Why do you want to set QMAKESPEC to contain both Qt3 and Qt4 dirs? You only need to call the right version of qmake (either for Qt3 or Qt4) for everything to work.
    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.


  3. #3
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT3/QT4 Simultaneous

    Quote Originally Posted by wysota View Post
    Why do you want to set QMAKESPEC to contain both Qt3 and Qt4 dirs? You only need to call the right version of qmake (either for Qt3 or Qt4) for everything to work.
    How can I do this? I noticed for VS2003 QT3's is "win32-msvc.net" and QT4's is "win32-msvc2003". Does this basically mean I can't build both without logging off and back on?

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

    Default Re: QT3/QT4 Simultaneous

    I have no idea what you mean by logging off and on in this context. You need two versions of qmake -- one for Qt3 and the other for Qt4. Then you can set QMAKESPEC to the directory containing the specs you want (if you want, as you can also set the specs by passing arguments to qmake).
    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.


  5. The following user says thank you to wysota for this useful post:

    JediSpam (23rd August 2011)

  6. #5
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT3/QT4 Simultaneous

    sorry for the confusion. i meant by logging off/on windows to reset the qmakespec variable under environment paths. let me look into passing the arguments

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

    Default Re: QT3/QT4 Simultaneous

    You don't have to log off to change environment variables. You can set them in the command line.
    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. #7
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT3/QT4 Simultaneous

    thanks for the help so far! I managed to build QT4 correctly by specifying what qmake and qmakespec i wanted to run. I successfully can build the examples but now when I try to run one of the .exe I get this error.

    Qt Code:
    1. animatedtiles.exe - Entry Point Not Found
    2. The procedure entry point "?free@QVectorData@@SAXPAU1@H@Z" could not be located in the dynamic link library QtCored4.dll
    To copy to clipboard, switch view to plain text mode 

    I tried to move the QtCored4.dll to the debug folder but still did not work. Any idea?

  9. #8
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT3/QT4 Simultaneous

    fixed issue by moving directories into the front of PATH. Thanks!

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

    Default Re: QT3/QT4 Simultaneous

    In situations like this it is best to either use a manifest that will tell Windows which libraries to use or to have a script that will set all the paths properly and execute the main application binary.
    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.


  11. The following user says thank you to wysota for this useful post:

    JediSpam (5th October 2011)

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.