I have downloaded Codelite for Ubuntu and installed on my PC. I just ran " Hello World " to get familiar with controls. And this is the output I am getting after trying to build and run the project even there aren't any errors in my program.
/bin/sh -c '/usr/bin/make -j4 -e -f Makefile'
----------Building project:[ k - Debug ]----------
make[1]: Entering directory '/home/swet/Desktop/k'
/usr/bin/gcc-4.8 -c "/home/swet/Desktop/k/k.c" -g -O0 -Wall -o ./Debug/k.c.o -I. -I.
/usr/bin/g++-4.8 -o ./Debug/k @"k.txt" -L.
/bin/sh: 1: /usr/bin/g++-4.8: not found
k.mk:76: recipe for target 'Debug/k' failed
make[1]: *** [Debug/k] Error 127
make[1]: Leaving directory '/home/swet/Desktop/k'
Makefile:4: recipe for target 'All' failed
make: *** [All] Error 2
1 errors, 0 warnings
Although I can still run the code, I don't want to see that error warning. I would really appreciate if you could help me out how to eliminate that error warning.
Help for a Beginner in Codelite Ubuntu
-
- CodeLite Curious
- Posts: 4
- Joined: Tue Jan 13, 2015 5:20 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Help for a Beginner in Codelite Ubuntu
Do you have g++ installed?
For me, it exists:
Try installing the build-essential package:
This should fix it
Eran
For me, it exists:
Code: Select all
eran@ubuntu-14-04-64:~$ ls -l /usr/bin/g++-4.8
-rwxr-xr-x 1 root root 775888 אפר 5 2014 /usr/bin/g++-4.8
Code: Select all
sudo apt-get install build-essential
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Tue Jan 13, 2015 5:20 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Help for a Beginner in Codelite Ubuntu
It didn't work. It is showing build essential is already newest version.
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Help for a Beginner in Codelite Ubuntu
Hi,
In my experience, ubuntu installs the 'g++' package by default. I'm fairly sure it did so for my ubuntu 14.04 VBox guest (I presume it's 14.04 that you're using).
What is the output of doing:
ls -l /usr/bin/g++*
Also try doing:
g++ -v
If these suggest that g++ isn't installed, do:
sudo apt-get install g++
Regards,
David
In my experience, ubuntu installs the 'g++' package by default. I'm fairly sure it did so for my ubuntu 14.04 VBox guest (I presume it's 14.04 that you're using).
What is the output of doing:
ls -l /usr/bin/g++*
Also try doing:
g++ -v
If these suggest that g++ isn't installed, do:
sudo apt-get install g++
Regards,
David
-
- CodeLite Curious
- Posts: 4
- Joined: Tue Jan 13, 2015 5:20 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Help for a Beginner in Codelite Ubuntu
g++ is installed by default.
Nevertheless I still checked it in terminal by running
ls -l /usr/bin/g++*
lrwxrwxrwx 1 root root 7 Sep 5 00:32 /usr/bin/g++ -> g++-4.9
-rwxr-xr-x 1 root root 810824 Oct 11 14:36 /usr/bin/g++-4.9
For g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.9/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.9.1-16ubuntu6' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
When I ran this sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It still didn't work for me. The error still exists unfortunately.
Nevertheless I still checked it in terminal by running
ls -l /usr/bin/g++*
lrwxrwxrwx 1 root root 7 Sep 5 00:32 /usr/bin/g++ -> g++-4.9
-rwxr-xr-x 1 root root 810824 Oct 11 14:36 /usr/bin/g++-4.9
For g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.9/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.9.1-16ubuntu6' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.9.1 (Ubuntu 4.9.1-16ubuntu6)
When I ran this sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It still didn't work for me. The error still exists unfortunately.
-
- CodeLite Expert
- Posts: 120
- Joined: Sun May 10, 2009 6:56 am
- Contact:
Re: Help for a Beginner in Codelite Ubuntu
Above it shows g++ 4.8, but below it shows that g++ 4.9 is the one installed. Try re-selecting a default compiler. Also, try this from the command line:reddy wrote:I have downloaded Codelite for Ubuntu and installed on my PC. I just ran " Hello World " to get familiar with controls. And this is the output I am getting after trying to build and run the project even there aren't any errors in my program.
/bin/sh -c '/usr/bin/make -j4 -e -f Makefile'
----------Building project:[ k - Debug ]----------
make[1]: Entering directory '/home/swet/Desktop/k'
/usr/bin/gcc-4.8 -c "/home/swet/Desktop/k/k.c" -g -O0 -Wall -o ./Debug/k.c.o -I. -I.
/usr/bin/g++-4.8 -o ./Debug/k @"k.txt" -L.
/bin/sh: 1: /usr/bin/g++-4.8: not found
k.mk:76: recipe for target 'Debug/k' failed
make[1]: *** [Debug/k] Error 127
make[1]: Leaving directory '/home/swet/Desktop/k'
Makefile:4: recipe for target 'All' failed
make: *** [All] Error 2
1 errors, 0 warnings
Although I can still run the code, I don't want to see that error warning. I would really appreciate if you could help me out how to eliminate that error warning.
Code: Select all
cd /home/swet/Desktop/k
g++ -c k.c -g -O0 -Wall -o ./Debug/k.c.o
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Help for a Beginner in Codelite Ubuntu
go to: settings->build settings->compilers
find the compiler you are using, and change tools to point to g++-4-9 instead of g++-4.8
OR:
settings->build settings->compilers->Add compilers->scan computer for installed compilers
and it should pick the g++-4.9 compiler
Try to build your project again
Eran
find the compiler you are using, and change tools to point to g++-4-9 instead of g++-4.8
OR:
settings->build settings->compilers->Add compilers->scan computer for installed compilers
and it should pick the g++-4.9 compiler
Try to build your project again
Eran
Make sure you have read the HOW TO POST thread