how to add my own funtion into a library

This is a discussion on how to add my own funtion into a library within the Tech Board forums, part of the Community 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

    Post how to add my own funtion into a library

    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
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,671
    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.

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