[lug] Compilation Problem

Kevin King kevin at precisonline.com
Thu Jul 13 14:09:40 MDT 2000


I have just resolved a g++ problem that's been plaguing me for a
couple of hours, and was wondering if perhaps someone might explain
to me why this is so.

For starters, I have a lib directory with a bunch of libraries needed
by my main program.  One particular library called "liblock.a" is
reliant upon another library "libtcp.a", so when you link the first,
the second has to be linked in as well.  When I compile the main
program via:

g++ -o result -L ../../lib -ltcp -llock

I get a bunch of errors about missing stuff from the tcp library.  If
I reverse the libraries on the command line:

g++ -o result -L ../../lib -llock -ltcp

...it compiles without any problems.  I didn't think the order of the
libraries was significant -- why would it be so?  (Caldera 2.2)

Thanks!

P.S. Can someone offer directions from Longmont to tonight's meeting?

--Kevin
kevin at precisonline.com
http://www.precisonline.com
http://www.precisonline.com/gold.htm





More information about the LUG mailing list