Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: what program to download to start C programming

  1. #1
    Join Date
    Nov 2007
    Beans
    27

    what program to download to start C programming

    hi

    i am doing a project on robotics and need to start learning C to make a program to communicate with hardware via serial port. What program would you recommend me to use? I am using Ubuntu.

    thanks!

  2. #2
    Join Date
    Apr 2007
    Beans
    14,781

    Re: what program to download to start C programming

    See the sticky.

  3. #3
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,285
    Distro
    Kubuntu

    Re: what program to download to start C programming

    I would start by learning the C language. You will undoubtedly need a compiler to build your practice programs. Get the compiler and related tools by:

    Code:
    $ sudo apt-get install build-essential manpages-dev
    Communicating via a serial port is an advanced topic. It would appear that you do not have much/any experience with C, so you will have a while to go before I believe you will be ready to tackle serial ports. You will also need to become familiar with the Linux OS, in as far as knowing which device node pertains to the serial port you will be using.

    Good luck with your studies.

  4. #4
    Join Date
    Nov 2007
    Beans
    27

    Re: what program to download to start C programming

    i have looked up the LasRozas link but I cannot figure out what is the actual program on which I write my C code. Can I get it from ADD/Remove applications?
    Is the compiler included in this program?

  5. #5
    Join Date
    Apr 2007
    Beans
    14,781

    Re: what program to download to start C programming

    Quote Originally Posted by simocusi View Post
    i have looked up the LasRozas link but I cannot figure out what is the actual program on which I write my C code. Can I get it from ADD/Remove applications?
    Is the compiler included in this program?
    There is a link in the sticky for compiling and writing C programs.

    For an editor or IDE to use, which is also in the sticky, you can just use Gedit for now. That is what I use. It has the features that are useful for programming, and has plugins to add more functionality.

  6. #6
    Join Date
    Nov 2007
    Beans
    27

    Re: what program to download to start C programming

    so I have to save my gedit file as a .c file? and then, how do I compile and run it?

    thanks!!

    pd: LaRoza and not LasRozas, sorry

  7. #7
    Join Date
    Nov 2007
    Beans
    27

    Re: what program to download to start C programming

    ok, just found it on your wiki!

  8. #8
    Join Date
    Nov 2007
    Beans
    27

    Re: what program to download to start C programming

    i get this though:

    simo@simo-laptop:/$ gcc prova.c -o prova
    prova.c:1:17: error: stdio: No such file or directory
    prova.c: In function ‘main’:
    prova.c:8: warning: incompatible implicit declaration of built-in function ‘printf’
    simo@simo-laptop:/$

    and i did run $ sudo apt-get install build-essential manpages-dev

    any clue?

  9. #9
    Join Date
    Dec 2006
    Location
    Glasgow, Scotland
    Beans
    470
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: what program to download to start C programming

    Did you include stdio.h like this:

    Code:
    #include <stdio.h>

  10. #10
    Join Date
    Jan 2008
    Location
    Raytown, MO
    Beans
    460
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: what program to download to start C programming

    simocusi,

    Have you built a simple hello world c program, to make sure things are working?

    Code:
    #include <stdio.h>
    
    int main ()
    {
    	printf("Hello World!\n");
    
    	return 0;
    }
    Save this as hw.c. Then from the commandline:
    Code:
    steveo@delldesktop:~/Desktop$ gcc hw.c -o helloworld
    steveo@delldesktop:~/Desktop$ ./helloworld
    Hello World!
    Hope this helps.

    Steve

Page 1 of 2 12 LastLast

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
  •