Results 1 to 8 of 8
I'm trying to install GCC. I've made the make files.
Code:
ed@Awesome:~/Desktop/gcc-4.2.1$ sudo make install
Password:
make[1]: 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
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-29-2007 #1Just Joined!
- Join Date
- Jul 2007
- Location
- USA
- Posts
- 61
Install Error
I'm trying to install GCC. I've made the make files.
I know very little about program installation.Code:ed@Awesome:~/Desktop/gcc-4.2.1$ sudo make install Password: make[1]: 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[1]: *** [install-fixincludes] Error 2 make[1]: Leaving directory `/home/ed/Desktop/gcc-4.2.1' make: *** [install] Error 2
- 07-29-2007 #2Just Joined!
- Join Date
- Jan 2007
- Location
- Germany
- Posts
- 73
Did You have any errors/warnings on previous stages (./configure & make) ???
- 07-29-2007 #3
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?
- 07-30-2007 #4Just Joined!
- Join Date
- Jul 2007
- Location
- USA
- Posts
- 61
- 07-30-2007 #5
Write c++ code in any text editor like vi, nano or gedit. Let say, filename is test.cpp
Execute this
Code:g++ test.cpp ./a.out
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 07-30-2007 #6Just Joined!
- Join Date
- Jul 2007
- Location
- USA
- Posts
- 61
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?
- 07-30-2007 #7
Use -o option
Code:g++ test.cpp -o test ./test
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 07-30-2007 #8Just Joined!
- Join Date
- Jul 2007
- Location
- USA
- Posts
- 61
Thanks a lot! I can finally start programming in Linux!


Reply With Quote

