Hi, I'm having a problem to link a couple of libraries by gcc in linux. Here's the situation: File main.c calls functions in library lib1.a, while some functions in library lib1.a call functions in library lib2.a. I used the following command to link: gcc -o $@ main.o lib1.a lib2.a The linker complained about undefined reference to functions in lib2.a. What can be the problem? I know it's not the link order. Thanks. Kevin