To: djgpp AT delorie DOT com Date: Mon, 20 Mar 2000 05:06:41 0000 From: "nimrod a. abing" Message-ID: Mime-Version: 1.0 X-Sent-Mail: off X-Expiredinmiddle: true X-Mailer: MailCity Service Subject: smart linking X-Sender-Ip: 208.160.246.197 Organization: QUALCOMM Eudora Web-Mail (http://www.eudoramail.com:80) Content-Type: text/plain; charset=us-ascii Content-Language: en Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Hellow! I am making a class and function library using DJGPP. I make one file for each module or class definition. As in all the methods and definitions for a class go into one file. My question is, does gcc or ld do the 'smart linking' or dead code elimination thing when I later link my library in my programs? A few years back, I read in a review in PC Techniques about a compiler called JPI Topspeed C/C++. It does this smart linking thing with template classes. It does not link in all of the methods for a template class, only those that are actually called in your program. This reduces the size of the executable. It makes sense to link in only the methods that will be actually used in a program. I don't know if it works for ordinary classes, I haven't been able to get a copy of JPI Topspeed C/C++. I used to program libraries using Borland compilers, and I had to create a separate file for each method that belongs to a single class. It was a nightmare in file management. Must I do the same thing using DJGPP? Must I split and distribute my class method definitions into many files (one method to a file)? --- nimrod_a_abing ---------------- Hot Windows Tip: ---------------- How to free up at least 300 MB of hard disk space (as seen from the MS-DOS prompt): C:\>deltree c:\windows Delete directory "Windows" and all its subdirectories? [yn] y Deleting Windows... C:\> (don't try this at home kids... not unless you have Linux installation CDs) Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com