linking libraries by gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux