Important: Please read the Qt Code of Conduct -

c: Command not found

  • 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?

  • @Stan-Huang

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

  • 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?

  • Lifetime Qt Champion

    @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.

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

  • Lifetime Qt Champion


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

    How do you start Qt Creator?

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

  • Lifetime Qt Champion

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

  • 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

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

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

    The content of 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,/.$,,'

    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"
    # No readlink(1), so let's try ls -l
    me=ls -l "$me" | sed 's/^.*-> //'
    base=dirname "$me"
    me=makeAbsolute "$me" "$base"

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

    Add path to deployed Qt libraries in package

    if test -d "$qtlibdir"; then

    Add Qt Creator library path

    export LD_LIBRARY_PATH
    exec "$bindir/qtcreator" ${1+"$@"}

  • @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

  • Lifetime Qt Champion

    Hi @Adarsh_Kumar

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


  • Hi @aha_1980,
    Yes I want to cross compile

  • Lifetime Qt Champion

    @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?


Log in to reply