![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 26
Rep Power: 0
![]() |
Hi guys
I have always heard about GNU/Linux operating system and its advantages.So I reacently installed it.The problem is with compiling the c++ code using the command prompet.I am new to this OS and I have read that if I want to compile c++ code,I should save it in C file format and then browse to it through the shell ( or whatever its name is) then type: gcc ****.c (**** indicate the file name) but I keep receiving a maessage stating that the file was not found ,although I am 100% sure that it there (using dir command) What is the problem? Thank you all.... Verb1426
__________________
www.islam.ws |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Oct 2005
Posts: 134
Rep Power: 3
![]() |
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Aug 2005
Posts: 26
Rep Power: 0
![]() |
Thank you very much ,but isn't this different from the command gcc ?
The tutorial shows another command which is g++ . Moreover , I am still receiving the smae message.
__________________
www.islam.ws |
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() ![]() |
gcc ./filename.c
gcc ./filename.cpp notice the ./ make sure you include it.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
gcc -x c++ filename.cpp
-The "-x" option with c++ after it specifies the language. or g++ filename.cpp -You can also use g++ to compile c++ code. If you're using C code, then just do this: gcc filename.c
__________________
And there was much rejoicing... Yay.... |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Aug 2005
Posts: 26
Rep Power: 0
![]() |
Thank you .....it worked ,but not like A dream
due to my bad program :o Thank you all. Verb1426
__________________
www.islam.ws |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|