next up previous
Next: Upcasting Bug Up: Notes on using the Previous: Setting up your workspace

Compiling

Compiling should be done in the normal way (ie. using gmake in the source directory), and with all the normal flags (eg. OPT=1). Using gmake, in my experience, with the OPT=1 flag results in faster compilation as well as optimised code. But the fastest way to recompile your code is to use the OPTLIB=1 option. This links your code (compiled with debug flags) against the optimised libraries, and compiles about 2-3 times faster than not using any flags. It has the added advantage that you can use the debugger to step through your code (but not the system code). Using gmake without any flags also results in executables that are about ten times bigger than the optimised version (ie. they are huge).

Debugging should be done using gdb (or xxgdb for a graphical interface), rather than the normal system debuggers (ie. dbx and friends). Note that the commands differ from the standard ones (e.g. no 'stop' but rather 'break'). Help can be obtained by typing 'help' or 'help subject', while information is available with the 'info' command (see 'help info').

If gmake dumps core it may be because you are using a very old version that exists in /opt/local1/bin (Socorro only).



Ralph Marson
Wed Aug 28 17:15:27 MDT 1996