* fusion (mcp@xxxxxxxxxxxx) [20080505 00:35]: > But when I use libraryA in an application (say testapp) it gives me an > error: > > libraryA.a (libraryAsource.o): In function 'libraryAfunction': > libraryAsource.c:(.text+0xe): undefined reference to 'libraryBfunction' You have to pass all needed libraries to the compiler, i.e. gcc -o app app.o -lrarA -lraryB > It is funny that I don't get this error when I compile libraryA but only > when I compile testapp that uses libraryA. There isn't anything funny here. External references are only resolved when creating a binary or a shared library, not when creating a static library. Philipp