[lug] Compilation Problem
Chan Kar Heng
khchan at cyberdude.com
Fri Jul 14 00:01:33 MDT 2000
<disclaimer>
don't take my word for it, i only vaguely recall this in memory
</disclaimer>
but i gather one should think of it like this:
- linking current file
- link current file
- whatever reference not found, look for it in the next file to link
- link with next file, pay attention to symbols i want
thus in this:
g++ -o result -L ../../lib -llock -ltcp
references not in result.o/result.c will be
sought for in liblock.so
referenecs not in result.o/result.c and liblock.so
will be sought for in libtcp.so
you will get problems if you do this too:
g++ -L ../../lib -llock -ltcp -c result.o -o result
>Thanks for the directions. As to my "situation", yes, there are
>library dependencies. Drawn out, it might look like this:
>
> main
> / \
> tcp lock
> \
> tcp
>
>(parts of the tcp library are used in the main routine, and parts of
>the library are needed for the lock code.)
>
--------------------------------------------
i don't suffer from stress... i'm a carrier.
More information about the LUG
mailing list