Find the answer to your Linux question:
Results 1 to 10 of 10
i have installed UBUNTU 9.04.......i wanted it primarily for C and C++ programming........when i opened VI editor to write program following problem occured : 1. when i pressed a or ...
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    5

    programming in ubuntu 9.04

    i have installed UBUNTU 9.04.......i wanted it primarily for C and C++ programming........when i opened VI editor to write program following problem occured :
    1. when i pressed a or i key it wasn't showing insert mode....
    2.when i tried to write # for writing #include it showed message no cursor under string......
    3.when i searched programming from help menu i GOT TO KNOW by default packages are not available for C AND c++......but in fedora additional packagages can be added by customizing while installing it......can't we do it in ububtu 9.04...if yes how?


    please help........

  2. #2
    Just Joined!
    Join Date
    May 2006
    Location
    San Jose, CA
    Posts
    67
    Disclaimer: I am not a VI expert by any means.. but I can give you a couple of helpful pointers.

    First thing you can do to make your life a bit easier is install gvim. The number 2 problem is linked to number 1, if you are not in insert mode, you must be in command mode so VI was probably interpreting it as a beginning of a command.

    Where exactly did you search for programming, from which help menu?

    For C/C++ programming you need to have GCC installed (I have not used Ubuntu but I am sure it must be installed on your system). Open a terminal and type
    Code:
     gcc -v
    This will tell you what version of gcc you have, and what configuration options it has enabled. Look for a line that reads something like --enable-languages=ada,c,c++ that will tell you what type of code you can compile and execute.

  3. #3
    Linux Enthusiast Bemk's Avatar
    Join Date
    Sep 2008
    Location
    Oosterhout-NB, Netherlands
    Posts
    522
    I recommend you install the package build-essential

    This package will give you most packages you will need to write your C/C++ software.

  4. #4
    Just Joined!
    Join Date
    Aug 2009
    Posts
    1
    i installed the package build-essential first. from there i went into synaptic package manager and slected all of the dev packages that i wanted to use, and they were installed from the cd mainly.hope this helps.so far it has only asked for the cd for the packages

  5. #5
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    Also, I want to add that the default vi installed is vim-tiny (on Ubuntu), which to be frank, is extremely poor and watered down version of vim. I would recommend installing the package vim-full instead as it will come with a lot more stuff.

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,975
    Have you tried another editor, such as nedit? It is a MUCH better programming editor than vi/vim, et al. It is a GUI editor, so it won't work on a non-gui system, but it's great on any X-Windows front end. I even run it under cygwin on Windows. You should be able to install it from the Synaptic package manager. I did so on my Ubuntu laptop.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    Aug 2006
    Posts
    6
    why not try some IDE for programming , there are many to try out.
    e

  8. #8
    Linux Enthusiast Bemk's Avatar
    Join Date
    Sep 2008
    Location
    Oosterhout-NB, Netherlands
    Posts
    522
    Quote Originally Posted by harrry2006 View Post
    why not try some IDE for programming , there are many to try out.
    e
    My primary argument against IDE programming is that it consumes more CPU time, than it is worth to me. I can do my debugging outside a development environment, highlighting works in Gedit, and outside of an IDE you have much more control over your project (as you write your own makefiles).

  9. #9
    Just Joined!
    Join Date
    Aug 2009
    Posts
    5

    vi

    @debabratacse

    I just want to remind u one silly think....u hv to pree enter after hittinf 'i' or 'a' in vi to get into the corresponding modes

  10. #10
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Smile

    Though,I like vi,I would suggest Gedit too. make sure that you have gcc available on system. Though I'm not an ubuntu user check you "install/remove programs" (as in mandriva) or Synaptic package manager (as in debian) and install gcc packages.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...