On Aug 1, 2006, at 11:31 PM, Michael Glaesemann wrote:
Is there a way to specify which libs the modules should be linking
against, something like changing ones path?
One way is to specify an additional -L option in the environment
variable LDFLAGS. That's for adding to the library search path though
- I couldn't find any options in 'man ld' to *remove* a directory
from the library search path. I hope I simply missed it - it would
seem a rather odd omission otherwise.
If you've added an 'export LDFLAGS=-L/opt/local/lib' line to
~/.profile (or if DarwinPorts added it for you) that would export
that environment variable to any shell scripts you run.
You can check for that with 'env' or 'echo $LDFLAGS' from a command
prompt.
Since the linker checks in the directories in the order in which
they're listed, you can tell it to prefer /usr/lib by adding it again
at the beginning of the list. It will appear twice, but that does no
harm.
export LDFLAGS=-L/usr/lib -L/opt/local/lib
You can add that line to ~/.profile if you want it to take effect for
every session, or run it manually if you only want it to take effect
for a single login session.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net