Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Check platform on .pro [Solved]
Qt 6.11 is out! See what's new in the release blog

Check platform on .pro [Solved]

Scheduled Pinned Locked Moved 3rd Party Software
9 Posts 2 Posters 10.0k Views 1 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.
  • L Offline
    L Offline
    luca
    wrote on last edited by
    #1

    Hi all,
    I have a qt project with a .pro file that looks like this:
    @
    QT += core gui
    ...
    ...

    linux-g++ {
    INCLUDEPATH += ../qextserialport_x86
    QMAKE_LIBDIR += ../qextserialport_x86/build
    LIBS += -lqextserialport
    DEFINES = TTY_POSIX
    }
    linux-arm-gnueabi-g++ {
    INCLUDEPATH += ../qextserialport_beagle
    QMAKE_LIBDIR += ../qextserialport_beagle/build
    LIBS += -lqextserialport
    DEFINES = TTY_POSIX
    }
    ...
    ...
    @
    So when I compile for linux desktop (x86) I use some library and when I compile for arm processor I use some other library .

    The problem is that in my notebook after updating the system it seems that "linux-g++" is not recognized as my platform and it doesn't find library.

    What should be the problem?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      What updates did you do?

      What error messages do you see?

      What is the output of qmake?

      What is the error output of the make process?

      1 Reply Last reply
      0
      • L Offline
        L Offline
        luca
        wrote on last edited by
        #3

        I know I wasn't so clear but it's difficult to explain better.

        I can try with another question:

        What does it describe the word "linux-g++" or "linux-arm-gnueabi-g++"?
        How can I check if the name of my platform is right?

        I expect that when compiling or cross-compiling my application, the qmake evaluate this:
        @
        linux-g++ {
        INCLUDEPATH += ../qextserialport_x86
        QMAKE_LIBDIR += ../qextserialport_x86/build
        LIBS += -lqextserialport
        DEFINES = TTY_POSIX
        }
        @
        or this:
        @
        linux-arm-gnueabi-g++ {
        INCLUDEPATH += ../qextserialport_beagle
        QMAKE_LIBDIR += ../qextserialport_beagle/build
        LIBS += -lqextserialport
        DEFINES = TTY_POSIX
        }
        @

        How is this done?

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          The labels correspond to the so-called mkspec. Usually there is a directory called mkspecs/default within your Qt installation directory. The default dir is actually a symlink that points at the real mkspec for your system.

          On my Gentoo linux system I have:

          @
          ls -l /usr/share/qt4/mkspecs/default
          lrwxrwxrwx 1 root root 9 Mar 31 11:14 /usr/share/qt4/mkspecs/default -> linux-g++
          @

          so you can see that my default mkspec is linux-g++. What is yours? (NB your mkspecs may well be in a different location to mine).

          If I wanted to compile with a different mkspec for whatever reason (cross-compiling or customised compiler flags etc) then I would specify this on the qmake command line. For example:

          @qmake -spec linux-g++-local@

          is one I use to have custom compiler flags passed in.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            luca
            wrote on last edited by
            #5

            Ok thanks,
            now it's more clear.

            I check this in my notebook.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              luca
              wrote on last edited by
              #6

              Thanks to your suggestion I probably solved my problem.

              The problem was that after installing Linux in my notebook I copied qt4 folder from my desktop but during this operation it doesn't keep links so "default" became a directory and not a symlink to linux-g++ .

              Now I tried with rsync to copy from desktop to notebook and it works!!!

              Thanks again.

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #7

                Indeed, scp does not preserve symlinks. I always prefer to use rsync when doing bulk transfers - it can even preserve ACLs too.

                Let us know if you are still having trouble with it once you have had a chance to test it.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  luca
                  wrote on last edited by
                  #8

                  I tried with both "linux-arm-gnueabi-g++" and "linux-g++" and now it compile without problem.

                  Thnaks. :-)

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #9

                    You're welcome. I know these build issues can be frustrating.

                    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