how do i add my own library funtions??

This is a discussion on how do i add my own library funtions?? within the C Programming forums, part of the General Programming Boards category; hi there , my name is nitin, i am quite new to programming and just started of with c programing. ...

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    2

    how do i add my own library funtions??

    hi there ,
    my name is nitin, i am quite new to programming and just started of with c programing.
    i was doing some programs on recursive functions when i came across the part where
    it said the i could reduce the compilation time of my program if i added my own function
    to an already existing library such as math.lib.
    i am using tc201 compiler.
    this is what i had done
    1,i made a function definition of my function i wanted to add in a file of .c extention,.
    2.compiled the file ,it creats FILENAME.OBJ file.
    3.add function to the library c:\>tlib math.lib+c:\FILENAME.obj
    4.declared its prototype in a FILENAME.H file.
    5.wrote a program to use the function ,#included the FILENAME.H as the url in double quotes.

    now to the problem. when i compiled it gave me no error. but when i tried to run it gave me a linker error.

    does this mean that my function that i tried to add didn't get added to the lib ??
    please help.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Welcome to the forums!

    How old are you? Turbo C 2.01 had its 16th birthday this year. Are you younger than it by any chance? If you have an 8086 and are running DOS 1.0 you have an excuse for running TurboC. Otherwise, get a compiler that has been updated since the fall of the Roman empire. Try Dev-C++. If you still wan't technical help with an antique, you'll need to invent a time machine.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    > it said the i could reduce the compilation time of my program if i added my own function
    >to an already existing library such as math.lib.
    This is extremely bad advice. One update to your compiler and boom all your work has been lost.

    > i am using tc201 compiler.
    Your compiler is from the stone age.
    I'll take a guess that your OS is XP.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I have added my own functions to a header file, not a library file.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Library program - need some help
    By Guti14 in forum C Programming
    Replies: 4
    Last Post: 09-08-2004, 12:09 PM
  2. VC++6.0 Add member function Wizard
    By 7stud in forum C++ Programming
    Replies: 5
    Last Post: 04-05-2003, 07:48 PM
  3. Replies: 4
    Last Post: 11-12-2002, 05:26 AM
  4. Add and delete functions
    By Ana Val sazi in forum C++ Programming
    Replies: 5
    Last Post: 06-18-2002, 09:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21