help-make
[Top][All Lists]
Advanced

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

problems depending on -l


From: Karen Paffendorf
Subject: problems depending on -l
Date: Thu, 01 Dec 2005 18:29:59 -0800
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)

Hi,

I seem to be having two different problems with putting -l... as a dependency and linking $^ with gcc.

In the first, I am building my own library in a subdirectory
(using a "vpath libmy% my_directory" and "executable: -lmy"
and having runtime problems because the library exists in a different place.

ldd yields
 my_directory/libmy.so => not found

if I gcc with the -lmy instead of the generated my_directory/libmy.so the problem goes away.

ldd yields
 libmy.so => ???/libmy.so
and the executable runs.

Am I missing something in the compiler or ldd conf?

in the second on RH4 x86_64, -lm failed by explicately pulling in
/usr/lib/libm.so, which was the wrong format.
If the command included -lm, ldd showed it pointing to /lib64/libm.so.6
It worked fine in my other build environments.

I have workarounds for all of these by not using a -l dependency.
Am I using these incorrectly or is there a problem?


Thanks,
Karen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]