Yurttas/PL/IL/Ada-95/docs/edit-compile-exec.html
Jump to navigation
Jump to search
- using gnat resources for source code editing, compilation/linkage, and execution.
- editing -
usevi/vimoremacs, or any simpler, available editor.
separate/individual procedure textfiles should be named by ada-95 conventions as filename.adb.
you will be given main procedures usually with numbering like: filename_00.adb.
packages are either as:filename_p.adsfor spec andfilename_p.adbfor body in two separate/individual textfiles,
orfilename_p.adsfor spec only in one textfile. - compiling -
- gnatmake filename
(assuming main procedure is in a textfile: filename.adb)
This is compile and link to get an executable named: filename - gcc -c filename.adb
(assuming main procedure is in a textfile: filename.adb)
This is compile only and you need to link the compilation results to get an executable by gnatbl filename as filename - gcc -c filename_p.adb
gcc -c filename.adb
(assuming main procedure is in a textfile: filename.adb using a package in a textfile: filename_p.adb )
[the order of compilation is irrelevant, i.e., in any order.}
This is separate, individual compilation and you need to link the compilation results to get an executable by gnatbl filename as filename
- gnatmake filename
- executing -
filename(assuming compilation/linkage produced an executable.)
For detailed information:
- GNAT Reference Manual
- GNAT User's Guide
- Using GNU CC
- Debugging with GDB - Source Level debugger
- Using the Graphical Interface to GDB