-
January 22nd, 2002, 04:23 PM
#11
Senior Member
Yes, it did it automatically when I installed linux. Also, I copied a program from CD, but when I
tried to run the sucker it didn't work. The green files. What the hell am I doing wrong?
-
January 22nd, 2002, 05:26 PM
#12
i always liked the c++ way of doing things
#include <iostream.h>
int main (){
cout>>"Hello world\n";
return 0;}
i haven't tried it in linux so i don't even know if i'm right!
-
January 22nd, 2002, 05:49 PM
#13
Junior Member
Why the hell is this so complicated?
The question I believe was simple. The answers were many and yet misguiding....
Damn you lamers!
-
January 22nd, 2002, 10:13 PM
#14
Junior Member
In the end
[color=blue]I try to explain how to do a C program and compiler in Linux step by step, I hope that with this you can compile a program in C.
1) First use editor to write the program for example pico
pico hello.c
2) Write the program:
#include<stdio.h>
main ()
{
system("cls");
printf("\nHello world");
}
3) Compile the program:
gcc hello.c -o hello
4) Execute the program
./hello
This is all the steps you have to do I hope you compile your program by and good luck [color=blue]
Hide your face forever
dream and search forever
night and night you feel nothing
there\'s no way outside of my land
Open your eyes, open your mind ...
-
November 29th, 2003, 07:32 PM
#15
Check if all ur library files are in your include folder
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|