Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. is there any way to integrate two projects one build in qT4.1 and onother one in QT 6.4??

is there any way to integrate two projects one build in qT4.1 and onother one in QT 6.4??

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 536 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    odJL
    wrote on last edited by
    #1

    is there any way to integrate two projects one build in qT4.1 and onother one in QT 6.4?? because the one in 4.1 don't even build or run!!! in qt6.4

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      No, port that old project to Qt 5 first and then Qt 6. The transition from 5 to 6 should be pretty trivial.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • O Offline
        O Offline
        odJL
        wrote on last edited by
        #3

        well i didnt understand well i don't know i thought also it depend on the compiler cuz qt6 it works with 64bit s!!

        JonBJ S 2 Replies Last reply
        0
        • O odJL

          well i didnt understand well i don't know i thought also it depend on the compiler cuz qt6 it works with 64bit s!!

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @odJL said in is there any way to integrate two projects one build in qT4.1 and onother one in QT 6.4??:

          well i didnt understand well

          @SGaist said in is there any way to integrate two projects one build in qT4.1 and onother one in QT 6.4??:

          No, port that old project to Qt 5 first and then Qt 6

          That is what you need to do! As for bit-ness, you need both to be 32- or (preferably) 64-bit. You cannot mix bit-ness.

          1 Reply Last reply
          1
          • O odJL

            well i didnt understand well i don't know i thought also it depend on the compiler cuz qt6 it works with 64bit s!!

            S Offline
            S Offline
            SimonSchroeder
            wrote on last edited by
            #5

            @odJL said in is there any way to integrate two projects one build in qT4.1 and onother one in QT 6.4??:

            well i didnt understand well i don't know i thought also it depend on the compiler cuz qt6 it works with 64bit s!!

            If you use a library written with Qt4 and already compiled, there is the problem that you need to use the same compiler version (most likely) for the other project as well. For example, on Windows MSVC 2010, 2013 and 2017 are all not compatible with each other. You cannot link between different compiler versions (this has nothing to do with Qt in particular). I know that 2017 and 2019 are compatible, though. If you use pre-compiled Qt libraries, Qt 4 only exists for older compilers and Qt 6 only for newer compilers (on Windows).

            Biggest problem: your Qt 4 code needs to link to Qt 4 and your Qt 6 code needs to link to Qt 6. This is not possible, because both Qt versions define the same symbols for the linker. You also cannot pass a QString or a QVector between functions of Qt 4 and Qt 6. The ABIs are not compatible. There is no way to have both Qt 4 and Qt 6 inside the same program. This is the reason why you have to port one project over to use the same Qt version.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved