I'm trying to install GCC. I've made the make files.
I know very little about program installation.
ed@Awesome:~/Desktop/gcc-4.2.1$ sudo make install
make: Entering directory `/home/ed/Desktop/gcc-4.2.1'
/bin/sh ./mkinstalldirs /usr/local /usr/local
cd: 5: can't cd to host-i686-pc-linux-gnu/fixincludes
make: *** [install-fixincludes] Error 2
make: Leaving directory `/home/ed/Desktop/gcc-4.2.1'
make: *** [install] Error 2
Did You have any errors/warnings on previous stages (./configure & make) ???
under ubuntu, you need build-essential package for compiling and installing programs. please make sure that you have installed it.
on the other hand why don't you use APT or synaptic?
I tried APT just now, and it says I have the latest version. I guess the warning was nothing to worry about for now. How do I use G++?
Originally Posted by Tutku
Write c++ code in any text editor like vi, nano or gedit. Let say, filename is test.cpp
That's what I thought. It was the .cpp extension that was the problem. Anjuta was saving C++ files as .cc ...? (these are the files I was using to test) Once I change it to .cpp it was fine. Thank you.
Edit: How do I specify the name of the compiled executable?
Use -o option
g++ test.cpp -o test
Thanks a lot! I can finally start programming in Linux!