Thread: Library functions eg. String manipulation function

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    22

    Smile Library functions eg. String manipulation function

    Hi all...

    where is manipulation functions defined.....?
    there declaration like "string.h" is there in "TC\INCLUDE".

    from where it gets executed.....



    Thanks in advance...
    bhupesh

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    From the standard C library.

    You can look at the GNU C library (glibc) at http://www.gnu.org/software/libc/

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The functions that you find declared in <string.h> are part of the C runtime library, which may or may not be available as source code when you get your compiler.

    I can't remember whether Turbo C did supply source for the runtime library - I believe it didn't come as standard.

    Do you have a specific question about the Turbo C implementation, or what are you actually wanting to know?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    22

    Red face

    Hi....

    thanks for your reply, might b this a silly query....i wanted to know about runtime library only.....how it comes with the compilers and we can use the same as user defined function...

    does it come through the library file, .lib ?


    thanks
    ...
    bhupesh

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes, it's generally a library file that comes together with the compiler (or sometimes, for example in the case of gcc) as a separate package that is less tied directly to the compiler version. In modern systems it would be a dynamically loaded library (.DLL or .so) that holds the actual code for the runtime library.

    The runtime library is "used" as in binary form, not as source code, so you do not compile the strcpy() function each time you use it - it's just dragged in as an already compiled lump of code when the application is linked into an executable.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    22
    those libraries or dll are linked to our program.exe only?

    means compiler (tc.exe) only will link our code to that library implementation?

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes, the compiler will link a particular application to a particular library. If a newer library comes out, in the non-DLL case, the new code will not be used by existing applications, only applications which are built using the new library will use the new code.

    DLL's are linked to the application at load-time, so replacing a DLL with another one of the same name will essentially replace the content of any executable using that DLL.

    Turbo C does not produce or use DLL's, so it's kind of irrelevant to the discussion here.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

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. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. Compile Error that i dont understand
    By bobthebullet990 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 09:19 AM
  4. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  5. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM