My problem with C - Linux

This is a discussion on My problem with C - Linux ; Hello ... Firstly , sorry for my bad English. I am PHP,Python programmer , i want to work with C under Linux , i know C's basics since 4 years , but my problem with C is the libraries. With ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: My problem with C

  1. My problem with C

    Hello ...

    Firstly , sorry for my bad English.

    I am PHP,Python programmer , i want to work with C under Linux , i know
    C's basics since 4 years , but my problem with C is the libraries.

    With PHP or Python i can know all information i need about the basic
    libraries with official web site , but with C i don't know what are the
    libraries available or how i can use it.

    So , i need help where i can find information about C library.


  2. Re: My problem with C

    "MaaSTaaR" writes:

    > Hello ...
    >
    > Firstly , sorry for my bad English.
    >
    > I am PHP,Python programmer , i want to work with C under Linux , i know
    > C's basics since 4 years , but my problem with C is the libraries.
    >
    > With PHP or Python i can know all information i need about the basic
    > libraries with official web site , but with C i don't know what are the
    > libraries available or how i can use it.
    >
    > So , i need help where i can find information about C library.


    http://www.opengroup.org/onlinepubs/000095399/toc.htm

    --
    Måns Rullgård
    mru@inprovide.com

  3. Re: My problem with C

    MaaSTaaR wrote:
    > I am PHP,Python programmer , i want to work with C under Linux , i know
    > C's basics since 4 years , but my problem with C is the libraries.


    > With PHP or Python i can know all information i need about the basic
    > libraries with official web site , but with C i don't know what are the
    > libraries available or how i can use it.


    > So , i need help where i can find information about C library.


    Actually, there's only a single "official" library for C, libc.
    And that has to cover only a minimum set of functionality as
    required by the C standard. If you have e.g. the book by Kernig-
    han and Ritchie, "The C Programming Language", you will find all
    that's required (by the standard from 1989/90) in the appendix
    (in the standard from 1999 there are a few more). Another place
    you can find all the required functions is

    http://www.dinkumware.com/manuals/#S...%20C%20Library

    and click on the names of the header files - you will get
    the functions, macros and defines that are required by the
    C99 standard.

    Everything else is optional and not part of the language like
    in e.g. PHP. You typically have to find out which external
    library has the functionality you need (if there's one) and
    install it on your machine (but many important ones will al-
    ready be installed on a "normal" system). It's more like PEAR
    (for PHP) where you can find add-ons you may need.

    If you are looking for things that are required on a POSIX-
    conforming systems go to

    http://www.unix.org/single_unix_specification/

    and, after registering, go to "System Interface". Most of the
    functions there will be available under Linux.

    For someone coming from a PHP background this can look like
    a flaw of the language. But for someone coming from C the way
    how everything and its dog is directly integrated into PHP
    also looks strange to say the least;-) There are different
    approaches behind C and PHP - C is supposed to be a small
    language where most things not absolutely needed shouldn't
    be part of the language and instead be dealt via external
    libraries. PHP seens to use the opposite approach - integrate
    everything that ever could be needed into the language. The
    main problem with this approach as I see it is that it makes
    it very difficult to replace a badly witten component by a
    better one - you can't kick the old stuff out of the language
    since there's too much code relying on it, so all you can do
    is add another method for the same thing, which bloates the
    language more and more (I better stop here, you may have
    already figured that I am not a big fan of PHP;-)

    Actually, you will find that there exists a really huge number
    of libraries for C you can pick from - probably many, many more
    than are available for PHP (many PHP libraries will actually be
    built on top of a C library).

    If you write what you are looking for you probably will get a
    lot of help here (or over at comp.unix.programmer). You may
    sometimes find that there are too many alternatives;-)

    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

  4. Re: My problem with C

    On a sunny day (24 Jan 2007 16:51:42 -0800) it happened "MaaSTaaR"
    wrote in
    <1169686302.013231.142120@v45g2000cwv.googlegroups. com>:

    >Hello ...
    >
    >Firstly , sorry for my bad English.
    >
    >I am PHP,Python programmer , i want to work with C under Linux , i know
    >C's basics since 4 years , but my problem with C is the libraries.
    >
    >With PHP or Python i can know all information i need about the basic
    >libraries with official web site , but with C i don't know what are the
    >libraries available or how i can use it.
    >
    >So , i need help where i can find information about C library.
    >


    A good thing is to first get familiar with libc.
    Use libc.info, try:
    ls /usr/share/info/libc.info*

    I have unzipped all of these on my system and catted together as one big
    textfile in my home directory, and I can then have it open in 'joe' editor
    and look throught it, or search for any function name in it.

    That is basic stuff you will need all the time.
    As to other libraries, there are so many, but a ls in
    /usr/lib or /usr/local/lib
    will show some important ones already.
    Then google or man page or indeed apropos.
    I find new stuff everyday on my system :-)


  5. Re: My problem with C

    On 2007-01-25, MaaSTaaR wrote:
    > Hello ...
    >
    > Firstly , sorry for my bad English.
    >
    > I am PHP,Python programmer , i want to work with C under Linux , i know
    > C's basics since 4 years , but my problem with C is the libraries.
    >
    > With PHP or Python i can know all information i need about the basic
    > libraries with official web site , but with C i don't know what are the
    > libraries available or how i can use it.
    >
    > So , i need help where i can find information about C library.


    ls -l /usr/share/man/man[23]




    --

    Bye.
    Jasen

  6. Re: My problem with C

    On 2007-01-25, MaaSTaaR wrote:
    > Hello ...
    >
    > Firstly , sorry for my bad English.
    >
    > I am PHP,Python programmer , i want to work with C under Linux , i know
    > C's basics since 4 years , but my problem with C is the libraries.


    I know waht's in the standard library,

    info libc will tell you - there's probably an HTML version you can install too

    all the other libraries that I use (sdl,pq,zlib,gtk,xml ... etc) have
    their own websites documenting them.

    many sections in the function reference for PHP (chapter VI) correspond
    directly libraries that are also available for C.

    Bye.
    Jasen

+ Reply to Thread