Results 1 to 9 of 9

Thread: IDE for Beginers

  1. #1
    Join Date
    Apr 2014
    Beans
    16

    IDE for Beginers

    Hi people.

    I am currently learning C language so I needed an IDE for it.first i used ajnuta but it had a c99 error for most of my programs (said that i can's initialize a variable in loops but now i saw a program known as Emacs.

    I need to know how to use it for making C programs i.e Compile them and also run them.
    can someone give me step by step instructions as to using this program I've gone to their site and all they tell are shortcuts for it and that makes it more confusing.
    Pictures will be increasingly helpfull.

    The version is
    GNU Emacs 24.3.1 GTK+ Version 3.10.7
    Last edited by oldsmobile2; May 10th, 2014 at 07:42 PM.

  2. #2
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Lubuntu 14.10 Utopic Unicorn

    Re: Setting up Emacs

    Thread moved to Programming Talk.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |

  3. #3
    Join Date
    Apr 2014
    Beans
    16

    Re: Setting up Emacs

    Anyone???


  4. #4
    Join Date
    Apr 2012
    Beans
    5,823

    Re: Setting up Emacs

    Are you set on using emacs? A different editor/IDE such as geany might have a less steep learning curve. IIRC it will do simple C/C++ builds out of the box provided you have the basic development tools installed (easiest way is to install the build-essential metapackage, which contains gcc, g++, make and the supporting libraries).

  5. #5
    Join Date
    Apr 2014
    Beans
    16

    Re: Setting up Emacs

    As a matter of fact i installed geaney just now because Emacs was seemingly tough to use.
    but now i am stuck with another problem.
    I have an Computer Programming class where i am taught C language in Dev c,so I have to do projects and small programs ocassionally but now I have learnt that there is a C99 problem in Linux and furthermore the libraries like Conio.h are not used in linux so i don't know how to use gets() for char and initializing variables in for loop.

    Can you atleast tell me the solutions to these problems and any other advice you may have.

  6. #6
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,065
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Setting up Emacs

    1) http://stackoverflow.com/questions/8...nio-h-on-linux

    2) All these IDE/editors use the same compiler under the hood (gcc). May you could envision that the problem of variable initialization isn't with the compiler but with your code or the way you compile it. After all, you are just a beginner and these compilers are not distributed in the wild without running some very heavy testing. They are also used to compile most Linux apps, so if there were such a blatant bug it would have been fixed already. Post your loop code and someone may tell you why you get the error.
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

  7. #7
    Join Date
    Apr 2014
    Beans
    16

    Re: Setting up Emacs

    Thank you for your reply.
    I got around the c99 error by initializing them outside the loop but i still don't know the library which contains the gets() function for scanning the char strings.
    in linux(In windows i think it was conio.h) could you help me with that .

  8. #8
    Join Date
    Apr 2012
    Beans
    5,823

    Re: Setting up Emacs

    In Linux, gets() is available from <stdio.h> HOWEVER afaik you should use fgets() instead because it takes an explicit buffer size (to prevent overflow)

    See man fgets for more info

  9. #9
    Join Date
    Apr 2014
    Beans
    16

    Re: Setting up Emacs

    Thanks your help is much appreciated.

Bookmarks

Posting Permissions

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