[Spread-users] use a static lib, get rid of .so?
michelnok at mail.ru
Fri Feb 9 09:12:30 EST 2007
use a static lib, get rid of .so?Hello Allen,
It is default gcc behaviour, when it searches .so for first. You can
override it by specifiyng a full library name. For example,
/usr/local/lib/libspread.a instead of -lspread.
----- Original Message -----
From: Allen Brunson
To: spread-users at lists.spread.org
Sent: Friday, February 09, 2007 3:44 PM
Subject: [Spread-users] use a static lib, get rid of .so?
hello spread users,
i casually looked through the mailing list archives, but didn't see any
questions like this.
i am evaluating spread for potential use in a project. i wrote a bunch of
test code on macosx to figure out the api. so far, so good. but actual
full-scale deployment would take place on linux machines, so i tried
recompiling my code over there. it builds okay, but when i try to run the
resultant program, this is the message i get:
error while loading shared libraries: libspread.so: cannot open shared
No such file or directory
i suppose i could figure out why the program can't find libspread.so, but i
don't want to do that. i'd rather build a program that links against
libspread.a and does not require any shared objects at all. if we end up
using spread, it will be deployed on hundreds of linux machines. i don't
want to have to install libraries on all those machines. that's how i
*thought* i'd built the program, but apparently not. i just used -lspread
on the link line, and there is a libspread.a available, so i figured that's
what it would link against.
i built spread 4.0.0 from source and installed it on a suse linux box
myself. can anybody tell me how to either a) build it only as a .a lib,
rather than a .so lib, or b) how to link my program so that it doesn't
require the .so?
More information about the Spread-users