Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. set Qt path to configure in a project on Ubuntu
Forum Updated to NodeBB v4.3 + New Features

set Qt path to configure in a project on Ubuntu

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 517 Views
  • 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.
  • JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by
    #1

    I am using configure to build one project which needs Qt. How to set Qt Path to configure
    ./configure --prefix=path
    I tried to
    export QT_CFLAGS=/opt/thirdParties/Qt/5.15.2/gcc_64/include
    export QT_LIBS=/opt/thirdParties/Qt/5.15.2/gcc_64/lib
    Although configure is ok, the Qt path is not set properly in Makefile which does not include any qt paths. And make fails with error message QApplication can not be found.
    Have not used configure for ages.

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      Could you please run configure in an empty target directory and post the output?

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      0
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #3

        thank for your reply. The Qt part in configure file is as follows:

        if test -n "$QT_CFLAGS"; then
            pkg_cv_QT_CFLAGS="$QT_CFLAGS"
         elif test -n "$PKG_CONFIG"; then
            if test -n "$PKG_CONFIG" && \
            { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.11.0 Qt5Widgets Qt5Gui Qt5Quick Qt5QuickWidgets Qt5QuickControls2 Qt5Svg\""; } >&5
          ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.11.0 Qt5Widgets Qt5Gui Qt5Quick Qt5QuickWidgets Qt5QuickControls2 Qt5Svg") 2>&5
          ac_status=$?
          $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
          test $ac_status = 0; }; then
          pkg_cv_QT_CFLAGS=`$PKG_CONFIG --cflags "Qt5Core >= 5.11.0 Qt5Widgets Qt5Gui Qt5Quick Qt5QuickWidgets Qt5QuickControls2 Qt5Svg" 2>/dev/null`
        		      test "x$?" != "x0" && pkg_failed=yes
        else
          pkg_failed=yes
        fi
         else
            pkg_failed=untried
        fi
        if test -n "$QT_LIBS"; then
            pkg_cv_QT_LIBS="$QT_LIBS"
         elif test -n "$PKG_CONFIG"; then
            if test -n "$PKG_CONFIG" && \
            { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.11.0 Qt5Widgets Qt5Gui Qt5Quick Qt5QuickWidgets Qt5QuickControls2 Qt5Svg\""; } >&5
          ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.11.0 Qt5Widgets Qt5Gui Qt5Quick Qt5QuickWidgets Qt5QuickControls2 Qt5Svg") 2>&5
          ac_status=$?
          $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
          test $ac_status = 0; }; then
          pkg_cv_QT_LIBS=`$PKG_CONFIG --libs "Qt5Core >= 5.11.0 Qt5Widgets Qt5Gui Qt5Quick Qt5QuickWidgets Qt5QuickControls2 Qt5Svg" 2>/dev/null`
        		      test "x$?" != "x0" && pkg_failed=yes
        else
          pkg_failed=yes
        fi
         else
            pkg_failed=untried
        fi
        
        1 Reply Last reply
        0
        • JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #4

          @JoeCFD said in set Qt path to configure in a project on Ubuntu:

          pkg_cv_QT_LIBS

          prefix path in pkg pc files is not set properly when qt is installed. The prefix is something like /home/qt/work/install which does not exist and is not the installed path.
          Otherwise, export PKG_CONFIG_PATH=$Qt5_DIR/lib/pkgconfig:$PKG_CONFIG_PATH will solve the problem.

          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