Click to See Complete Forum and Search --> : writing c programs in linux..
iomayho
01-23-2003, 10:30 AM
hi., i'm linux newbie and i would like to know how to write programs and compile them in linux.
i've done c programming in windows but using MS visualstudio. and i have no idea how to do it in linux....can anybody help me....? thanks.
goon12
01-23-2003, 10:53 AM
You can do this:
#include<stdlib.h>
int main()
{
printf("Hello World!\n");
return 0;
}
Save as hw.c, then do
make hw
and you should have the executbale hw in the current dir, to run it you may have to do
./hw
-goon12
iomayho
01-23-2003, 11:32 AM
so, with what editor should i write my program......?
is there one that can debug, similar to MS visual Studio...?
Stuka
01-23-2003, 12:28 PM
If you want an IDE, check out KDevelop (for KDE) or Anjuta (for GNOME). Both provide many of the same features that M$ Visual Studio does.
goon12
01-23-2003, 12:29 PM
There are a ton of editors, I personally like "vim", You could check out http://anjuta.org/ if your looking for something like MS Visual
For debugging I would say gdb ( try "man gdb" for help )
warren612001
01-23-2003, 12:50 PM
There is a web site that is free that will teach you how to use all the linux tools to program in c http://www.icanprogram.com
:rolleyes:
threadhead
01-23-2003, 05:23 PM
Originally posted by warren612001
There is a web site that is free that will teach you how to use all the linux tools to program in c http://www.icanprogram.com
:rolleyes:
nice link. ;)