ubuntu and its C compiler

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ix

    ubuntu and its C compiler

    It seems not remember how to compile with gcc a C program in linux (ubuntu)

    how i have to compile this programme?
    It seems gcc doesn't find stdio.h..

    why is all antiintuitive?

    Thank you and Good Morning

    ---------------------------------------------------
    #include <stdio.h>

    int main(void)
    {
    printf("Ok \n");
    return 0;
    }
    ---------------------------------------

    io@jjjj:/home/name/Scrivania/Io$ gcc prova.c

    prova.c:3:20: error: stdio.h: Nessun file o directory
    prova.c: In function â?~mainâ?T:

    prova.c:6: warning: incompatible implicit declaration of built-in function
    â?~printfâ?T




  • Walter Roberson

    #2
    Re: ubuntu and its C compiler

    In article <4810d1ed$0$402 12$4fafbaef@rea der5.news.tin.i t>, Ix <x@x.xwrote:
    >It seems not remember how to compile with gcc a C program in linux (ubuntu)
    >how i have to compile this programme?
    >It seems gcc doesn't find stdio.h..
    It sounds like you have missed installing some files or packages.
    For information about what you need and how to install it, consult
    a newsgroup that deals with development on your operating system packaging.
    There is no particular location in the C standard for installing
    these files (and stdio.y doesn't even have to be a real file according
    to the C standards), and the location for installing them can vary
    according to the system administrator's whims.
    --
    "Allegories are in the realm of thoughts, what ruins are in
    the realm of things." -- Walter Benjamin

    Comment

    • Antoninus Twink

      #3
      Re: ubuntu and its C compiler

      On 24 Apr 2008 at 18:32, Ix wrote:
      It seems not remember how to compile with gcc a C program in linux (ubuntu)
      >
      how i have to compile this programme?
      It seems gcc doesn't find stdio.h..
      I belive by default Ubuntu doesn't install any development files
      whatsoever.

      apt-get install libc6-dev
      would be a good first step...
      why is all antiintuitive?
      It's the Ubuntu developers you need to ask. Presumably they're
      deliberately aiming their distro at people like your grandmother, rather
      than programmers.

      Comment

      • user923005

        #4
        Re: ubuntu and its C compiler

        On Apr 24, 11:32 am, "Ix" <x...@x.xwrot e:
        It seems not remember how to compile with gcc a C program in linux (ubuntu)
        Herein we find the value of commercial Linux systems like Redhat or
        Suse...
        Technical support.
        how i have to compile this programme?
        It seems gcc doesn't find stdio.h..
        Probably, your environment is goofed up.
        why is all antiintuitive?
        Intuition is a poor way to program anyway. Check your environment. I
        guess that your include path is wrong.
        Thank you and Good Morning
        You're welcome.
        ---------------------------------------------------
        #include <stdio.h>
        >
        int main(void)
        {
           printf("Ok \n");
           return 0;}
        >
        ---------------------------------------
        >
        io@jjjj:/home/name/Scrivania/Io$ gcc prova.c
        >
        prova.c:3:20: error: stdio.h: Nessun file o directory
        prova.c: In function â?~mainâ?T:
        >
        prova.c:6: warning: incompatible implicit declaration of built-in function
        â?~printfâ?T

        Comment

        • santosh

          #5
          Re: ubuntu and its C compiler

          user923005 wrote:
          On Apr 24, 11:32 am, "Ix" <x...@x.xwrot e:
          >It seems not remember how to compile with gcc a C program in linux
          >(ubuntu)
          >
          Herein we find the value of commercial Linux systems like Redhat or
          Suse...
          Technical support.
          Actually a range of support options are available for Ubuntu too, both
          free and paid.

          <http://www.ubuntu.com/support>

          The problem is that the default Ubuntu install does not include any
          packages for programming. You need to install a range of packages
          manually to start programming. The OP will be better off asking in the
          Ubuntu forums.

          <http://www.ubuntu.com/support/community/webforums>
          <http://www.ubuntu.com/support/community/locallanguage>

          Comment

          • Jensen Somers

            #6
            Re: ubuntu and its C compiler

            Ix wrote:
            It seems not remember how to compile with gcc a C program in linux (ubuntu)
            >
            how i have to compile this programme?
            It seems gcc doesn't find stdio.h..
            >
            why is all antiintuitive?
            >
            Thank you and Good Morning
            >
            ---------------------------------------------------
            #include <stdio.h>
            >
            int main(void)
            {
            printf("Ok \n");
            return 0;
            }
            ---------------------------------------
            >
            io@jjjj:/home/name/Scrivania/Io$ gcc prova.c
            >
            prova.c:3:20: error: stdio.h: Nessun file o directory
            prova.c: In function â?~mainâ?T:
            >
            prova.c:6: warning: incompatible implicit declaration of built-in function
            â?~printfâ?T
            >
            >
            >
            >
            This should normally be asked on the Ubuntu mailing lists or Ubuntu forums.
            However, I find the easiest way to have all things concerning C and C++
            development is to install the packaged "build-essential" via synaptic or command
            line. This should pack all header files and tools.

            - Jensen

            Comment

            • Rui Maciel

              #7
              Re: ubuntu and its C compiler

              On Thu, 24 Apr 2008 20:32:04 +0200, Ix wrote:
              It seems not remember how to compile with gcc a C program in linux
              (ubuntu)
              <snip />

              Have you installed the build-essencials package?


              Rui Maciel

              Comment

              • =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?=

                #8
                Re: ubuntu and its C compiler

                prova.c:3:20: error: stdio.h: Nessun file o directory

                I had this problem before; I remedied it with:

                apt-get install gcc

                Comment

                • sophia

                  #9
                  Re: ubuntu and its C compiler

                  On Apr 24, 11:32 pm, "Ix" <x...@x.xwrot e:
                  It seems not remember how to compile with gcc a C program in linux (ubuntu)
                  >
                  how i have to compile this programme?
                  It seems gcc doesn't find stdio.h..
                  >
                  why is all antiintuitive?
                  >
                  Thank you and Good Morning
                  >
                  ---------------------------------------------------
                  #include <stdio.h>
                  >
                  int main(void)
                  {
                     printf("Ok \n");
                     return 0;}
                  >
                  ---------------------------------------
                  >
                  io@jjjj:/home/name/Scrivania/Io$ gcc prova.c
                  >
                  prova.c:3:20: error: stdio.h: Nessun file o directory
                  prova.c: In function â?~mainâ?T:
                  >
                  prova.c:6: warning: incompatible implicit declaration of built-in function
                  â?~printfâ?T
                  see this :-


                  Comment

                  • Sri Harsha Dandibhotla

                    #10
                    Re: ubuntu and its C compiler

                    On Apr 25, 5:32 am, Tomás Ó hÉilidhe <t...@lavabit.c omwrote:
                    prova.c:3:20: error: stdio.h: Nessun file o directory
                    >
                    I had this problem before; I remedied it with:
                    >
                    apt-get install gcc
                    she already has gcc installed.. or it wouldnt even give the error in
                    the first place.
                    installing libc6 and libc-dev should be enough I think.

                    Comment

                    • Ix

                      #11
                      Re: ubuntu and its C compiler


                      "Antoninus Twink" <nospam@nospam. invalidha scritto nel messaggio
                      news:slrng11liq .flc.nospam@nos pam.invalid...
                      On 24 Apr 2008 at 18:32, Ix wrote:
                      >It seems not remember how to compile with gcc a C program in linux
                      >(ubuntu)
                      >>
                      >how i have to compile this programme?
                      >It seems gcc doesn't find stdio.h..
                      >
                      I belive by default Ubuntu doesn't install any development files
                      whatsoever.
                      >
                      apt-get install libc6-dev
                      would be a good first step...
                      this is the only step all right
                      "apt-get install gcc"
                      install only gcc not its library

                      very good you in 3 words have solve the problem
                      thank you



                      Comment

                      • =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?=

                        #12
                        Re: ubuntu and its C compiler

                        On Apr 25, 8:52 pm, Sri Harsha Dandibhotla <harsha....@gma il.com>
                        wrote:
                        apt-get install gcc
                        >
                        she already has gcc installed.. or it wouldnt even give the error in
                        the first place.
                        installing libc6 and libc-dev should be enough I think.

                        I know, but obviously it isn't installed fully/correctly.

                        I think I might have also tried:

                        apt-get install g++

                        because it gets in all the files you want.

                        Comment

                        Working...