[vtkusers] Pb building and using the STATIC libraries of VTK (CVS version)

William A. Hoffman billlist at nycap.rr.com
Tue Oct 22 09:35:10 EDT 2002

With static libraries the order that you link libraries is important.
Unix linkers perform only a single pass, so you want the libraries to
be in the order of using as many symbols as possible, to least number of
symbols.   For example, vtkGraphics should come before vtkCommon.  With
shared libraries, you always get the entire library so order is not a problem.
With static libraries, you only get what you need.    If you use cmake for
your project, the library ordering is maintained by cmake, and should work
for both shared and static builds.


At 01:47 PM 10/21/2002 -0700, Thomas Deschamps wrote:
>Dear VTK users,
>I have some problems using the static libraries produces by the compilation of the sources of VTk on 2 different platforms:
>1) Linux RedHat 7.2
>2) SunOs 5.7
>My version of VTK is downloaded from the CVS repository.
>In both cases, the linking against these libraries is not working. It produces a lots of Undefined Symbol, while all the *.a files are called.
>I used -static on both machines for gcc. And for choosing between static and shared libraries, I just set the cmake flag BUILD_SHARED_LIBS:BOOL=OFF
>I really want to create an executable independent from the libraries, I really want to use static libraries.
>Thank you very much for your help
>Thomas (tdeschamps at lbl.gov)
>This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list