Subj : Re: BC++ And BCBuilder at same time To : borland.public.cpp.borlandcpp,borland.public.cppbuilder.ide,borland.public.install.bcpp,borland.public.install.cppbuilder From : Hans-Bernhard Broeker Date : Mon Dec 01 2003 07:10 am David Patte wrote: > I have both Borland C++ 5.02 with patch1 and BCB 5 with patch 1 both > installed on my machine. I notice that my path in my autoexec.bat > indicates paths all my borland products (including these two) > Since BCC32.exe and a few other files are on both paths, but > different files, will it choose the correct .exe when I alternate > between these two compilers? Not reliably, so you better avoid such a mixup. The best way I've found is to set *none* of the installed compiler toolchains' environment variables directly in autoexec.bat, because whatever choice you make there will be wrong for the majority of them as soon as you have more than two, anyway. Instead, have a central "batches" directory in the PATH, and a tool that lets you both add and *remove* entries from the PATH, the tool itself installed in a directory on the PATH (I use a freeware from the Simtel.Net DOS collection). Proceed by writing a pair of batch files in "batches" per toolchain to "enable" and "disable" it, respectively. These batch files should prepend the toolchain's entries to the PATH, and remove them again, respectively, and create/change/remove environment variables, while at it. That way, you can type "en_b5.bat" (or use it as the startup batch file in a desktop link for a "bc++5.02 shell") to have a command line environment fit for use with C++ 5.02, and "dis_b5.bat" to turn it all off again. For good measure, change the PROMPT, too, so it's always obvious which mode of operation the shell is currently in. This kind of setup may feel like a pain in the lower back at first, but it more than pays off in the long run, especially if you have considerably more than two toolchains available (I have roughly 10 altogether). If you find you routinely use one compiler much more than the others, you can still call up its enabler batch at the end of autoexec.bat for convenience. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain. .