i have installed debian on my system.can any one help m= e to find the way to run the programs in c,c++ or java.many people say it h= as to be done through vi editor,but i dont know to work with the vi editor.
please do mail me at gangzee007@rediffmail.com
[1] [adstream_nx.cgi=] =
References
On 26 Aug 2004, ganesh iyer spake thusly:
i have installed debian on my system.
welcome to debian fan club.
can any one help m= e to find the way to run the programs in c,c++ or java.many people say it h= as to be done through vi editor,but i dont know to work with the vi editor.
please elaborate. Do you want to write new programs in said languages or do you want to run as in execute already existing programs ?
If the latter then $./program-name should 'run' the program. If the former use any editor (vi, emacs) to write the program.
please do mail me at gangzee007@rediffmail.com
This is a mailing list. All mails go to all : google to find out more.
On Thu, Aug 26, 2004 at 04:52:39PM -0000, ganesh iyer wrote:
i have installed debian on my system.can any one help m the way to run the programs in c,c++ or java.many people say it h to be done through vi editor,but i dont know to work with the vi editor.
Err ... there are three things that you do with a program, in any language. Edit, Compile and Run.
To edit your programs, use some editor like vi, emacs, gedit ... or any other that you like. To compile, use a suitable compiler. For C, for example,
$ gcc -o hello hello.c
will compile your hello.c into an executable file called hello.
Now to run this executable, type
$ ./hello
But, all these are very simplistic instructions ... more issues involved. You seem to be new to programming in general, and unix programming in particular ... it would be good if you'll first refer to some book like an intro to C or something.
If what you are looking for is IDE (integrated development environment) like Visual Studio on Windows, take a look at Anjuta if you are using the GNOME desktop or KDevevelop if you are using KDE.
What I find most amazing is that you chose to install Debian although apparently you seem very new to programming!
Sameer.
Sometime Today, Sameer D. Sahasrabuddhe assembled some asciibets to say:
What I find most amazing is that you chose to install Debian although apparently you seem very new to programming!
It's quite possible that a sysadmin, who's good at adminning a debian system, knows nothing about programming.
he would know about editors though.
On Fri, 27 Aug 2004, Sameer D. Sahasrabuddhe wrote:
To edit your programs, use some editor like vi, emacs, gedit ... or any other that you like. To compile, use a suitable compiler. For C, for example,
$ gcc -o hello hello.c
I always prefer vi for writing small C programs. After you are comfortable with vim you will love the simplicity yet power it offers. You can use vi as an mini-IDE! Here is how ...
For compiling you need to set makeprg as follows:
press Esc Esc
:set makeprg=/usr/bin/gcc\ '%'
Enter appropriate path of gcc above here % refers to the current filename
now :make
will compile the program and take the cursor to the first error !!
you can do
:cnext :cprevious
to step through errors.
to run your program:
:!./a.out
This is I think an IDE-like functionality in an editor --> Very Cool :)
Of course you can write a Makefile and simply say :make
But for small programs the above method is very easy.
HTH Nikhil
Hello:
Vi has a tutorial :-)
unix> vimtutor
It essentially opens a tutorial file in the vi itself.
Open A console (like unix> xterm OR unix> konsole ) first, and then fire up vimtutor.
I learned any things from the following tutorials
http://users.actcom.co.il/~choo/lupg/tutorials/index.html
Please use man pages also eg. When u r working with gcc, try man gcc, etc
ganesh iyer wrote:
i have installed debian on my system.can any one help m= e to find the way to run the programs in c,c++ or java.many people say it h=s to be done through vi editor,but i dont know to work with the vi editor.
please do mail me at gangzee007@rediffmail.com