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. Libraries are different after moving to Qt
Forum Updated to NodeBB v4.3 + New Features

Libraries are different after moving to Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 918 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.
  • D Offline
    D Offline
    DannyS
    wrote on last edited by
    #1

    I've got a CMAKE project that builds a static library. When I try and create a Qt project to build the same library, I get different size files and the resulting application crashes.

    I created a Qt project and imported all the source and headers . The following is the start of the .pro file

    QT -= core gui
    TARGET = serialc
    TEMPLATE = lib
    CONFIG += staticlib

    The rest of the project file is pretty simple:
    INCLUDEPATH += <path>
    SOURCES += <source files>
    HEADERS += <header files>

    My configuration is:

    Windows 10 using Qt 4.8.0 and MinGW 5.10.1

    I thought I might use the create the Qt project using the original CMakeLists.txt but that would never compile. I kept getting a kit must be configured. I could never figure out where I was going wrong so I dropped back to creating a static library project.

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

      Hi and welcome to devnet,

      Might be a silly question but why change from cmake ?
      It's supported in Qt Creator.

      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
      • D Offline
        D Offline
        DannyS
        wrote on last edited by
        #3

        Not silly at all. The boss wants a single way to build it all.

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

          Then you can stay with cmake.

          If that helps, it's also becoming the official build system for Qt 6. qmake will still be provided for project handling though.

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

          D 1 Reply Last reply
          2
          • SGaistS SGaist

            Then you can stay with cmake.

            If that helps, it's also becoming the official build system for Qt 6. qmake will still be provided for project handling though.

            D Offline
            D Offline
            DannyS
            wrote on last edited by
            #5

            @SGaist
            Thanks for your reply. Obviously, you haven't read my original post. Otherwise you would have seen that staying with CMAKE was not fruitful.

            Thanks anyway

            SGaistS 1 Reply Last reply
            0
            • D DannyS

              I've got a CMAKE project that builds a static library. When I try and create a Qt project to build the same library, I get different size files and the resulting application crashes.

              I created a Qt project and imported all the source and headers . The following is the start of the .pro file

              QT -= core gui
              TARGET = serialc
              TEMPLATE = lib
              CONFIG += staticlib

              The rest of the project file is pretty simple:
              INCLUDEPATH += <path>
              SOURCES += <source files>
              HEADERS += <header files>

              My configuration is:

              Windows 10 using Qt 4.8.0 and MinGW 5.10.1

              I thought I might use the create the Qt project using the original CMakeLists.txt but that would never compile. I kept getting a kit must be configured. I could never figure out where I was going wrong so I dropped back to creating a static library project.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @DannyS said in Libraries are different after moving to Qt:

              I thought I might use the create the Qt project using the original CMakeLists.txt but that would never compile. I kept getting a kit must be configured.

              My guess: You must tell Qt Creator where to find your copy of CMake. (see Tools > Options... > Kits > CMake)

              You might have the same issue as https://forum.qt.io/topic/98469/another-no-valid-kits-found-error/

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              3
              • D Offline
                D Offline
                DannyS
                wrote on last edited by
                #7

                That is something that dint' come up in a google search. I'll look into this.

                Thanks

                1 Reply Last reply
                0
                • D DannyS

                  @SGaist
                  Thanks for your reply. Obviously, you haven't read my original post. Otherwise you would have seen that staying with CMAKE was not fruitful.

                  Thanks anyway

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @DannyS said in Libraries are different after moving to Qt:

                  @SGaist
                  Thanks for your reply. Obviously, you haven't read my original post. Otherwise you would have seen that staying with CMAKE was not fruitful.

                  Thanks anyway

                  I did but misunderstood what happened to you.

                  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
                  0

                  • Login

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