@freddix
As I said in my first post, .a files are 'static' libraries as such they are linked in your program making it bigger contrary to Amiga shared libraries that can be loaded at the point the program needs it (and closed immediatly after that).
Using a function from a static library (or archive) is easy and it's like using a function from another .o : you should have an header (.h) with the function prototype, then you can use the needed function in your code, and last you add it to the link command line in your makefile.
For example, let's say i'd like to use function pthread_create from libpthread.a (SDK:local/newlib/lib/libpthread.a) I'll have to include it's header (SDK:local/common/include/pthread.h) using
#include <pthread.h>
(SDK:local/common/include/ is a system path and GCC look into it automatically)
then at link stage you add -lpthread to the command line like that :
ppc-amigaos-gcc -o MultiThreadedExe $(OBJ) -lpthread
That's all.
Please note that as Jack mentionned you can directly add your .a file(s) amongst your .o files, but then there is not so much interest in building a .a file. When you build your own library which thus is not placed into a standard system path, you should instruct GCC where it should look for your library by adding -Lpath on the command line for example let's say you built your own library named libDark3D.a and which is placed in a subdir named myLibs of your current directory, you'll write something like that :
ppc-amigaos-gcc -o progTest mainTest.o another.o -LmyLibs -lDark3D
@Samurai_Crow
This is the reverse code using function *before* code providing function.