Automating Visual C++ Builds with Perl
Last updated: 4 April 1999
(Minor fix 9 Mar 2001. Dejanews links broken, sorry.)
I am starting to script my Visual C 5.0 builds with Perl so I can
run them at night.
I used to use Makefiles for that, but under Visual C 5.0,
maintaining Makefiles is an extra burden, and the average programmer
will rebel if you ask him or her to use them.
According to Steve Hardy,
Perl is the way to go.
Questions
- How can I write a Perl script that does what nmake used to do? Solved!
- How can I retrieve the contents of the output window? Solved
You can retrieve the output window contents from the file with same name
as the workspace file, but suffix .plg.
- How can I check to see if there were errors during the build? Solved
Scan the .plg file for the appropriate text line. See dswmake.pl.
- It complains "Cannot access the ClassView information file. ClassView information will not be available."
and won't procede until I click OK.
Is the .ncb file readonly, or opened by another application?
Try deleting it.
See http://www.dejanews.com/getdoc.xp?AN=339207576. (Added 4 April 1999)
Also, if MSDEV is running, with your project open, the next
copy of MSDEV to open the same project will put up a dialog box.
So be careful to close all other MSDEV's. (Note that starting MSDEV
via OLE can leave invisible MSDEV's laying around in memory, e.g. if
you kill the Perl script before it sends the 'become visible' command.)
Useful Links
Dan Kegel