c: Command not found
-
wrote on 19 Jan 2019, 06:06 last edited by
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? -
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?wrote on 19 Jan 2019, 11:50 last edited byHow did you install Qt creator?
Which version of Qt did you install?
Is the tool chain completely installed? -
wrote on 21 Jan 2019, 02:42 last edited by
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?
-
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?
@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-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.
wrote on 22 Jan 2019, 00:45 last edited by@aha_1980 Could you say it in detail how I can check if the compilation environment setup legal or not?
-
@aha_1980 Could you say it in detail how I can check if the compilation environment setup legal or not?
Check the environment variables, especially if
PATH
is changed or variables likeCC
.How do you start Qt Creator?
-
wrote on 22 Jan 2019, 05:29 last edited by
Just click the Qt-Creator icon from the tool bar.
-
Can you run
gcc --version
in a command prompt ? -
wrote on 22 Jan 2019, 08:27 last edited by
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. -
wrote on 22 Jan 2019, 08:55 last edited by
I started up Qt-Creator in such way, then it works
1 . open Terminal
2 . execute $~/qtcreator-4.1.0/bin/qtcreator.shThe "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/shUse 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
echomakeAbsolute "$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
fibindir=
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
fiAdd 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+"$@"} -
I started up Qt-Creator in such way, then it works
1 . open Terminal
2 . execute $~/qtcreator-4.1.0/bin/qtcreator.shThe "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/shUse 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
echomakeAbsolute "$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
fibindir=
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
fiAdd 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+"$@"}wrote on 8 Oct 2019, 00:46 last edited by@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
-
@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
do you actually want to cross-compile? If not, then you have another problem.
Regards
-
do you actually want to cross-compile? If not, then you have another problem.
Regards
wrote on 8 Oct 2019, 04:10 last edited byHi @aha_1980,
Yes I want to cross compile -
Hi @aha_1980,
Yes I want to cross compile@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