Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Monday, June 4, 2012

How to save hbmk2's error messages?

If you are familiar with XBase++'s PBuild, you will notice that error messages during compilation are written into an "error.log." Do we have the same feature with our hbmk2? Of course the ">" (greater than) sign will normally save messages to a text file if you will place them in a batch file. For example:

                            try1.bat

                            c:> dir *.prg /b > log.txt

                            The result of the above command will look like this:

                                     try1.prg
                                     try2.prg, etc


In hbmk2, all you have to do in order to save error messages during compilation into a log file is this one (put together into a batch file):


                               try2.bat
              
                               set HB_COMPILER=mingw
                               hbmk2 try.hbp -rebuild 1> log.txt 2>&1

This above saves anything displayed on screen during complilation into a text file, in this example, log.txt.