Mail Archives: djgpp/1992/07/13/03:58:03
Two little tips and a question about gprof.
First a little bit of help: If C++ can not find include files, you have
probably avoided typing errors by copying the following part from README
to your AUTOEXEC.BAT. Well, what worked with 1.06 does not work with
1.07, and one colon must be replaced by a semicolon.
* Add the following lines to C:\AUTOEXEC.BAT:
set COMPILER_PATH=c:/djgpp/bin
set C_INCLUDE_PATH=c:/djgpp/include
set CPLUS_INCLUDE_PATH=c:/djgpp/cplusinc:c:/djgpp/include
**** ^
****That colon should be replaced with a ; | i.e. semicolon
set OBJC_INCLUDE_PATH=c:/djgpp/include
set OBJCPLUS_INCLUDE_PATH=c:/djgpp/include
set LIBRARY_PATH=c:/djgpp/lib
set TMPDIR=c:/tmp
^^^ this is where gcc's temp files go
****Also notice that the previous line is different from 1.06
set GO32TMP=c:/tmp
^^^ this is where your paging file goes
set GO32=ansi driver c:/djgpp/drivers/SOMETHING.grd gw 1024 gh 768
^^^ whatever driver works with your VGA (optional)
set BISON_SIMPLE=c:/djgpp/lib/bison.simple
set BISON_HAIRY=c:/djgpp/lib/bison.hairy
set FLEX_SKELETON=c:/djgpp/lib/flex.skeleton
GO32TMP is where go32 puts its paging file (TMP and TEMP are checked,
in that order, also)
Version 1.07 seems to need more memory than 1.06. Compiling with -O on a
4Meg memory computer with 2Meg disk cache (i.e. 2Meg free) seemed to
last hours. I then reduced my cache to 500K, and now compilations are
faster than with 1.06 on 700 line C++ program.
After these tips I feel I can afford to ask a question:
How is the gprof to be used? On a SUN option -pg is supposed to link the
appropriate libraries, is this the case with DJGPP? I tried -pg, linked
/djgpp/lib/mcount.o (or something named about that, I'm on UNIX now),
put -lxxx with different libs for xxx, and always there are some
_mcount* names missing from link.
So how exactly do I compile my C++ program so I can gprof it? Example?
--
Tapio Lehtonen PHONE + 358 0 708 4185 Room D320
Dept. Comp. Sci., Univ. of Helsinki TELEX 122785 TSK SF FAX 708 4441
Teollisuuskatu 23, SF-00510 Helsinki INTERNET tlehtone AT cs DOT Helsinki DOT FI
Finland Tapio DOT Lehtonen AT Helsinki DOT FI
- Raw text -