[MINC-users] Basic question about shared and static Minc libraries

Steve ROBBINS minc-users@bic.mni.mcgill.ca
Sun, 11 Jan 2004 18:28:01 -0500


On Mon, Dec 22, 2003 at 11:19:06AM -0500, Andre MATOS wrote:
> Hi Minc Users,
> 
> Can anyone give me a little explanation about shared and static libraries 
> in the minc tools and in which way should I use each one?

Conveniently, the short answer is: "you shouldn't have to worry about it."

While it is true that shared libraries have several advantages
(see e.g. http://www.tldp.org/HOWTO/Program-Library-HOWTO/index.html),
there is one usability issue with shared libraries: the system has to
know where to find them.  This isn't a problem for the shared libs that
come from your vendor (generally the ones in /lib and /usr/lib on a
unix system) as the vendor has set things up for you.  

However, for libraries built by third parties such as MINC, the
system configuration may need tweaking after installing them.  This
tweaking varies across systems and is often a source of confusion.
For that reason, we decided to build only static libs by default.
That's why you see the quoted output during the configure run:
 
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes

If you desire shared libs, simply configure using

	--enable-shared

and do the appropriate things after installing.

-Steve