Unable to use gcc
Hey, I am trying to use gcc. I need to compile a C prog. But I am unable to do. I have done this:
Code:
sujit@sujit-desktop:~$ gcc -Wall test.c |
Hi,
test if the the file is in the current directory before compiling it: Code:
ls test.c |
umm i tried! but it says:
Code:
sujit@sujit-desktop:~$ ls test.c |
Hi,
Likely you are in the you home directory. Try: Code:
cd Desktop To switch to you home directory use ~ Code:
cd ~ |
Thanks it worked! THX A LOT!!!!!!!!!!!!
Code:
sujit@sujit-desktop:~$ cd Desktop |
Also tell me, does conio.h and void main() work? coz it is giving me error, and its asking for int main() instead of void main().
Code:
/* FILE: test.c */ |
Try this:
Code:
gcc -Wall test.c -o test |
Hi,
Try : Code:
chmod +x a.out Code:
gcc -Wall test.c -o test.out |
Quote:
Regarding void main , that is just a warning message, you can ignore him. |
Quote:
|
Lol
|
Quote:
|
Quote:
Code:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
What about LOLCODE?
|
Thanks
thanks to everybody for answering me!
So the moral of the story is, u get o/p by issuing ./filename or chmod +x a.out ./a.out commands. isnt it? Also can I know how and why a.out is created? |
All times are GMT -5. The time now is 02:37 PM. |