lamouche@aurora.physics.utoronto.ca (Guy Lamouche) (06/06/91)
I would like some comments on the Borland C++ feature of having header files in a binary format. Does it speed the compilation a lot. I want to get Borland C++ and i own a 5Mhz 512K (don t laugh!) PC. Since I am a newcomer to this group, please be gentle with me if it is a FAQ. Guy Lamouche Eh c est la St-Jean bientot.
jim@tortuga.SanDiego.NCR.COM (Jim (James) Ruehlin) (06/07/91)
In article <1991Jun5.220703.662@helios.physics.utoronto.ca> lamouche@aurora.physics.utoronto.ca (Guy Lamouche) writes: > > I would like some comments on the Borland C++ feature of > having header files in a binary format. Does it speed the > compilation a lot. I want to get Borland C++ and i own a > 5Mhz 512K (don t laugh!) PC. I use the compiled header files extensively. After I realized how they work, it's decreased overall compilation time tremendously. At first, I had compiled headers on but didn't do anything special in my source code to accomodate them. This results in a compiled file being created for each set of #include files in your .c module. This is great if you don't change .h files much, as the only thing that takes time to compile is the lines in your .c file (with no multiple file openings to get at the .h files). However, if you do change .h files more than infrequently you can set up a list of #includes that's in all your .c files. They have to be in the same order and at the very beginning of the .c module. You should terminate the list with a "#pragma hdrstop". I do this with my 8 largest and most common header files and it makes a big difference. As far as your configuration goes, I'm not sure BC++ will run in that much memory. I suppose it could swap to your disk a lot. On the other hand, I use it for Windows programming so I eat up a lot of memory. Good luck! - Jim Ruehlin
UH2@psuvm.psu.edu (Lee Sailer) (06/13/91)
I use them too, and they help a lot. However, I did get caught by what Borland admitted is a bug. I trimmed everything down to a 10 line program that compiled without errors, but produced onerous run time errors, when the binary include feature is turned on. They've promised to let me know when they figure it out, but it's been a couple of weeks, now. The main symptom was that the values of argc and argv were not correctly passed to main(). They both had values of NULL. When binary includes is turned off, it works normally. The problem has to be somewhere in my includes, I guess, but Borland cannot find it (they say). lee