2 Replies - 3129 Views - Last Post: 22 February 2010 - 02:32 PM Rate Topic: -----

#1 santoni   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 22-February 10

Addition of userdefined function in library

Posted 22 February 2010 - 08:36 AM

How can I add an user defined function in Turbo c library?
Step by step procedure is required.
Is This A Good Question/Topic? 0
  • +

Replies To: Addition of userdefined function in library

#2 bodom658   User is offline

  • Villiage Idiom
  • member icon

Reputation: 114
  • View blog
  • Posts: 1,123
  • Joined: 22-February 08

Re: Addition of userdefined function in library

Posted 22 February 2010 - 02:09 PM

Are you talking about a precompiled .dll, .so, or .a? I would highly recommend writing your own library file. You can't inject your own functions into libraries, you need to get the source code for them, edit that as necessary, and compile it into a library.
Was This Post Helpful? 0
  • +
  • -

#3 NickDMax   User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Addition of userdefined function in library

Posted 22 February 2010 - 02:32 PM

not sure what you mean, but I will take a guess:

You would like to add a function to the default libraries.

You can do this using tlib -- I would LOVE to give you a step-by-step guide on how to use tlib but unfortunately it is REALLY REALLY OLD and I have forgotten.

if you are in the turbo C bin directory and you type tlib with no argument or "tlib /?" you will get the tlib help.

IT will tell you to using something like:

tlib library_name +objfile.obj

to add an object file to the library.

One should note though that adding user functions to the standard libraries is NOT recommended. What would be a better choice would be to create your own library of user funtions and then add THAT your compiler's options.

The way I typically do this is to edit the bcc32.cfg file and add a -L:path\to\library line.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1