Subj : Re: A really stupid Question - how to build a library - oops - clarified To : borland.public.cpp.borlandcpp From : @(none) Date : Wed Oct 06 2004 03:41 am D Kat wrote: > I cannot for the life of me find how to build a library in any of my BORLAND > books or the help window.... I used to know how with the old Unix compiler > but have now forgotten. I'm not even sure I should be building a library vs > another .cpp file that is loaded with the main.cpp file as an .obj. A > library would be better though for how I want it to look for the people who > will be using it. Well, I'd say the rules are simple ;-) If you want those people who are gonna use your routines to see and be able to modify you code, let them have the source file. Otherwise, give them the library. As far as creating a library goes, set the target to 'Library' from within the IDE (as simple as that)! but, if you're using the command line tools only use the 'compile only' option of the complier for compiling the files where you have implemented your routines and then use tlib (its been a while since i used tlib as such, so i don't remember the options, sorry). > > What I have are some functions that initialize and use an IO board. These > functions never change and it is confusing for the students to have to > include them in the programs they have to write. We have reached critical > mass in our lab and to simplify I want these routines to function much as > any other C function would. That is make the source code invisible to the > user but the functions themselves easily accessible by just including a > library or linking to an object file. > > I can't even remember if I have to have a Main() for a lib.... so that is > where I am at and if someone can point me in the right direction or give me > a simple run down, it would be appreciated. Nope, no 'main' reqd. in the .lib .