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. c: Command not found
Forum Updated to NodeBB v4.3 + New Features

c: Command not found

Scheduled Pinned Locked Moved Solved Installation and Deployment
14 Posts 5 Posters 6.2k Views 3 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.
  • Stan HuangS Offline
    Stan HuangS Offline
    Stan Huang
    wrote on last edited by
    #1

    I created an Empty QMake Project at ubuntu / Qt-Creator-4.1 by File --> New File or New Project --> Other Projects --> Empty QMake Project --> ...
    I built it and failed, getting: "c: Command not found".
    What do I miss in my Ubuntu environment?

    K 1 Reply Last reply
    0
    • Stan HuangS Stan Huang

      I created an Empty QMake Project at ubuntu / Qt-Creator-4.1 by File --> New File or New Project --> Other Projects --> Empty QMake Project --> ...
      I built it and failed, getting: "c: Command not found".
      What do I miss in my Ubuntu environment?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Stan-Huang

      How did you install Qt creator?
      Which version of Qt did you install?
      Is the tool chain completely installed?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • Stan HuangS Offline
        Stan HuangS Offline
        Stan Huang
        wrote on last edited by
        #3

        This Qt-Creator version is 4.1.0, not installed by me. This installation was left in a work environment and I was assigned to take over that job suddenly. I found Qt-Creator over there and then tried to use it. How can I check if all necessary tools ready in my Ubuntu environment? If it lacks some tools, where can I find to install them?

        aha_1980A 1 Reply Last reply
        0
        • Stan HuangS Stan Huang

          This Qt-Creator version is 4.1.0, not installed by me. This installation was left in a work environment and I was assigned to take over that job suddenly. I found Qt-Creator over there and then tried to use it. How can I check if all necessary tools ready in my Ubuntu environment? If it lacks some tools, where can I find to install them?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by aha_1980
          #4

          @Stan-Huang Was this Creator used for Cross-compiling?

          I've seen this error when Creator was started from an "environment-setup" shell script to set up the cross-compiler and then used for "normal" compiling.

          Qt has to stay free or it will die.

          Stan HuangS 1 Reply Last reply
          2
          • aha_1980A aha_1980

            @Stan-Huang Was this Creator used for Cross-compiling?

            I've seen this error when Creator was started from an "environment-setup" shell script to set up the cross-compiler and then used for "normal" compiling.

            Stan HuangS Offline
            Stan HuangS Offline
            Stan Huang
            wrote on last edited by
            #5

            @aha_1980 Could you say it in detail how I can check if the compilation environment setup legal or not?

            aha_1980A 1 Reply Last reply
            0
            • Stan HuangS Stan Huang

              @aha_1980 Could you say it in detail how I can check if the compilation environment setup legal or not?

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Stan-Huang

              Check the environment variables, especially if PATH is changed or variables like CC.

              How do you start Qt Creator?

              Qt has to stay free or it will die.

              1 Reply Last reply
              1
              • Stan HuangS Offline
                Stan HuangS Offline
                Stan Huang
                wrote on last edited by
                #7

                Just click the Qt-Creator icon from the tool bar.

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

                  Can you run gcc --version in a command prompt ?

                  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
                  • Stan HuangS Offline
                    Stan HuangS Offline
                    Stan Huang
                    wrote on last edited by
                    #9

                    gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
                    Copyright (C) 2013 Free Software Foundation, Inc.
                    This is free software; see the source for copying conditions. There is NO
                    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

                    1 Reply Last reply
                    0
                    • Stan HuangS Offline
                      Stan HuangS Offline
                      Stan Huang
                      wrote on last edited by
                      #10

                      I started up Qt-Creator in such way, then it works
                      1 . open Terminal
                      2 . execute $~/qtcreator-4.1.0/bin/qtcreator.sh

                      The "c: command not found" was gone and it built successfully.

                      The content of qtcreator.sh is:

                      source /opt/poky/2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi .
                      #! /bin/sh

                      Use this script if you add paths to LD_LIBRARY_PATH

                      that contain libraries that conflict with the

                      libraries that Qt Creator depends on.

                      makeAbsolute() {
                      case $1 in
                      /*)
                      # already absolute, return it
                      echo "$1"
                      ;;
                      *)
                      # relative, prepend $2 made absolute
                      echo makeAbsolute "$2" "$PWD"/"$1" | sed 's,/.$,,'
                      ;;
                      esac
                      }

                      me=which "$0" # Search $PATH if necessary
                      if test -L "$me"; then
                      # Try readlink(1)
                      readlink=type readlink 2>/dev/null || readlink=
                      if test -n "$readlink"; then
                      # We have readlink(1), so we can use it. Assuming GNU readlink (for -f).
                      me=readlink -nf "$me"
                      else
                      # No readlink(1), so let's try ls -l
                      me=ls -l "$me" | sed 's/^.*-> //'
                      base=dirname "$me"
                      me=makeAbsolute "$me" "$base"
                      fi
                      fi

                      bindir=dirname "$me"
                      libdir=cd "$bindir/../lib" ; pwd

                      Add path to deployed Qt libraries in package

                      qtlibdir=$libdir/Qt/lib
                      if test -d "$qtlibdir"; then
                      qtlibpath=:$qtlibdir
                      fi

                      Add Qt Creator library path

                      LD_LIBRARY_PATH=$libdir:$libdir/qtcreator$qtlibpath${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
                      export LD_LIBRARY_PATH
                      exec "$bindir/qtcreator" ${1+"$@"}

                      A 1 Reply Last reply
                      0
                      • Stan HuangS Stan Huang

                        I started up Qt-Creator in such way, then it works
                        1 . open Terminal
                        2 . execute $~/qtcreator-4.1.0/bin/qtcreator.sh

                        The "c: command not found" was gone and it built successfully.

                        The content of qtcreator.sh is:

                        source /opt/poky/2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi .
                        #! /bin/sh

                        Use this script if you add paths to LD_LIBRARY_PATH

                        that contain libraries that conflict with the

                        libraries that Qt Creator depends on.

                        makeAbsolute() {
                        case $1 in
                        /*)
                        # already absolute, return it
                        echo "$1"
                        ;;
                        *)
                        # relative, prepend $2 made absolute
                        echo makeAbsolute "$2" "$PWD"/"$1" | sed 's,/.$,,'
                        ;;
                        esac
                        }

                        me=which "$0" # Search $PATH if necessary
                        if test -L "$me"; then
                        # Try readlink(1)
                        readlink=type readlink 2>/dev/null || readlink=
                        if test -n "$readlink"; then
                        # We have readlink(1), so we can use it. Assuming GNU readlink (for -f).
                        me=readlink -nf "$me"
                        else
                        # No readlink(1), so let's try ls -l
                        me=ls -l "$me" | sed 's/^.*-> //'
                        base=dirname "$me"
                        me=makeAbsolute "$me" "$base"
                        fi
                        fi

                        bindir=dirname "$me"
                        libdir=cd "$bindir/../lib" ; pwd

                        Add path to deployed Qt libraries in package

                        qtlibdir=$libdir/Qt/lib
                        if test -d "$qtlibdir"; then
                        qtlibpath=:$qtlibdir
                        fi

                        Add Qt Creator library path

                        LD_LIBRARY_PATH=$libdir:$libdir/qtcreator$qtlibpath${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
                        export LD_LIBRARY_PATH
                        exec "$bindir/qtcreator" ${1+"$@"}

                        A Offline
                        A Offline
                        Adarsh_Kumar
                        wrote on last edited by
                        #11

                        @Stan-Huang !
                        I'm facing the similar problem and the error i have is
                        c: command not found
                        My Qt version is 5.9 and i'm using ubuntu 14.04.

                        and also, can you please send me the instructions to install this "source /opt/poky/2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi ." as i couldn't find this in my PC.

                        -Thanks in advance

                        aha_1980A 1 Reply Last reply
                        0
                        • A Adarsh_Kumar

                          @Stan-Huang !
                          I'm facing the similar problem and the error i have is
                          c: command not found
                          My Qt version is 5.9 and i'm using ubuntu 14.04.

                          and also, can you please send me the instructions to install this "source /opt/poky/2.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi ." as i couldn't find this in my PC.

                          -Thanks in advance

                          aha_1980A Offline
                          aha_1980A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Hi @Adarsh_Kumar

                          do you actually want to cross-compile? If not, then you have another problem.

                          Regards

                          Qt has to stay free or it will die.

                          A 1 Reply Last reply
                          0
                          • aha_1980A aha_1980

                            Hi @Adarsh_Kumar

                            do you actually want to cross-compile? If not, then you have another problem.

                            Regards

                            A Offline
                            A Offline
                            Adarsh_Kumar
                            wrote on last edited by
                            #13

                            Hi @aha_1980,
                            Yes I want to cross compile

                            aha_1980A 1 Reply Last reply
                            0
                            • A Adarsh_Kumar

                              Hi @aha_1980,
                              Yes I want to cross compile

                              aha_1980A Offline
                              aha_1980A Offline
                              aha_1980
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              @Adarsh_Kumar then please tell us more about your setup.

                              • which target?
                              • which toolchain did you install and where?
                              • have you setup Creator for cross compiling? what did you do?

                              Regards

                              Qt has to stay free or it will die.

                              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