Go to the previous, next section.

Amiga Libraries

Amiga-style libraries, such as amiga.lib, cannot be read by gcc directly. They need to be converted into a gcc-readable format using hunk2gcc, the AmigaDOS object converter made by Markus Wild.

To achieve this, simply grab a copy of latest amiga.lib (from Commodore Development Kit, see section Where do I get the Amiga includes?) and make a new directory where you want your converted object files to go, cd into it, and enter

	hunk2gcc amiga.lib [..further libs if you like..]

This generates an a.out object file for every program unit present in the hunk file (in this case, from amiga.lib).

As the final step convert all those files into an a.out style library by issuing:

	ar qc libamiga.a obj.*
	ranlib libamiga.a

The ranlib run builds a symbol table in the archive, and makes accesses to the library much faster.

NOTE: As long as you make no AmigaDOs specific calls, you can create a dummy library using:

  cat "int dummy;" >dummy.c
  gcc -c dummy.c
  ar crv libamiga.a dummy.o
  mv libamiga.a gcc:lib

Go to the previous, next section.