next up previous
Next: simlib Up: simula Previous: simmake


	  simld	- link and execute a Simula program

	  simld	main [modules] [-d] [-Ldirectory] [-llibrary] [-l]
	  main [-d] [-p] [-g] [-m=Mbyte] [-k=Kbyte] [-input=sysin]

	  simld	is an interface	script to the  linker,	'ld'.  Options
	  not recognized by simld are passed on	to ld.

	  The name of the Simula main  program,	 'main',  must	appear
	  first	 on the	line. 'modules'	are separately compiled	Simula
	  procedures  or   classes   where   the   location   of   the
	  corresponding	'.o' files are given explicitly.

	  Binary libraries of translated Simula	or C  code  to	search
	  for  matching	 routines  are	named  with  several -llibrary
	  options.  Note that 'ld' searches  these  libraries  one  by
	  one,	left to	right, so the relative order between libraries
	  that depend on each other is important.

	  Directories of where to look for  <library>  files  (lib*.a)
	  are  given  with  one	or several -Ldirectory switches. Again
	  this list is searched	 in  order.   /usr/local/simulabin  is
	  added	 last  to  this	 list.	If  the	 environment  variable
	  SIMULAHOME is	defined, that value is,	however, used instead.

	  Libraries can	be explicitly named,  or  given	 with  the  '-
	  l<library>  options  as  of  below.  Note that the option '-
	  L<directory>	in  such  cases	 becomes  important  since  it
	  defines  the	order  of  directories	where  to  search  for

	  Executing the	resulting executable program 'main' is	simply
	  done by entering its name.

	  In the simplest case,	a single Simula	main  program  can  be
	  linked and executed with:

		% simld	helloworld
		% helloworld

	  A  set  of  separate	classes	 and  procedures  linked  with
	  utilities in the Lund	Simula libraries:

		% simld	mainprog classa	classb procp -l

	  Linking with the debugger  and  starting  execution  in  the

		% simld	helloworld -d
		% helloworld -d

	  Printing the version of the runtime  system  linked  with  a
	  Simula program:

		% helloworld -p

	  Executing a Simula program with a  larger  memory  pool  for
	  Simula objects:

		% helloworld -m=8 -p

	  Executing a Simula program with debugger and prepared	input:

		% helloworld -d	-input=some.file

	  Options for simld:

	  -d   include debugger	support	with the executable.

	       include the file	lib<library>.a for search  for	object
	       code to include.

	       include <directory>  for	 search	 for  libraries	 ('.a'

	  -l   include a search	of the libraries  installed  with  the
	       Lund  Simula  system. Shorthand for "-lsimlib -llibsim"

	  Notice that options for simld	matches	these for simcomp (and
	  simmake).   Specifying  -L=dir1:dir2	should be matched with
	  -Ldir1 -Ldir2	to simld, and specifying  -I=liba:libb	should
	  be  matched  with -lliba -llibb. All three scripts takes the
	  short	hand option '-l' for including all libraries installed
	  with the Lund	Simula system.
	  Options for executing	Simula program:

	  -d   Start execution in the  Simula  debugger	 SIMDEB	 (only
	       possible	if the program has been	linked with the	SIMDEB

	  -g   Print a message each  time  the	garbage	 collector  is

	  -k=n Set the memory pool size	used for dynamic allocation to
	       n Kbytes.

	  -m=n Set the memory pool size	used for dynamic allocation to
	       n Mbytes.

	  -p   Print a message indicating the size of the storage pool
	       at  the start of	execution. At the end of execution cpu
	       time as well as the number of  garbage  collections  is

	       Connect sysin to	file rather than  the  standard	 input

	       Connect sysout to file rather than the standard	output

	  Note that the	input  and  output  of	the  debugger  is  not
	  affected by these two	options, but is	still connected	to the
	  standard input and output channels. These two	 options  make
	  it  possible to separate debug I/O from program I/O. This is
	  particularly useful when debugging programs designed to work
	  with piped I/O.

	  simman simcomp - to compile a	Simula program

	  simman simmake - to compile several dependent	Simula modules

	  simman simula	- to  get  overview  and  pointers  to	Simula