Thread: where are the function definitions to the ansi c library on linux?

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    31

    where are the function definitions to the ansi c library on linux?

    Where are functions in ANSI C such as strlen() or getchar() defined on a linux system? You are able to look through the header files but there's no definitions. Sometimes you see a declaration. I think someone told me a while back they are in shared object files *.so files in /usr/lib/. If this is correct, I was wondering how someone would make a shared object file like someone did in libpcap or libdnet? Thanks in advance.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    To get the source code for standard library functions like strlen, try
    http://www.gnu.org/software/libc/libc.html

    As for other packages, maybe try the home page of where the package originates, or perhaps sourceforge?

    In either case, someone else compiles the source code down to a set of library files, and then these library files are distributed.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  2. Porting a shared library from Linux to Windows
    By DARKGuy in forum C++ Programming
    Replies: 1
    Last Post: 06-23-2007, 01:45 PM
  3. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  4. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  5. Replies: 5
    Last Post: 02-08-2003, 07:42 PM