[vtkusers] linking problem

David Gobbi david.gobbi at gmail.com
Wed May 26 15:28:45 EDT 2010


Hi Matt,

I haven't seen this error myself, but my guess is that you are doing a
mixture of static linking and shared linking, and that is what is
leading to the error.  If you can show the link line and the gcc flags
that are used, then I might be able to offer more advice.

Have you tried building VTK with BUILD_SHARED_LIBS?  Doing a
shared-lib build is generally more forgiving than doing a static build
(though static is usually better for deployment).

   David


On Wed, May 26, 2010 at 12:21 PM, Matt Thiffault
<matt.thiffault at gmail.com> wrote:
> --Sorry if I've posted this twice, didn't get a confirmation e-mail when I
> posted the first one. I'm new to this mailing list thing--
>
> Hello,
>
> I've compiled VTK myself on a 32 bit Arch Linux system (2.6 kernel)
> following the instructions in README.html I'm working on porting a large
> project from windows to linux that uses VTK, and I've finally gotten all of
> the source to compile, just to hit a linker error. First there were over 600
> linker errors, which I corrected by re-arranging the order in which my code
> was linked against the different VTK component libraries (Common, Rendering,
> etc). The one linker error I have left is this:
>
> /usr/bin/ld: ScannerApplication: hidden symbol `vtkStructuredData::
> GetDataDimension(int)' in
> ../../../../../../../Libraries/VTK/lib/vtk-5.6/libvtkCommon.a(vtkStructuredData.cxx.o)
> is referenced by DSO
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: ld returned 1 exit status
> make: *** [ScannerApplication] Error 1
>
> From extensive googling I've found that this error generally means that
> there is something declared as private/protected in the given library that
> something else is trying to access, and that usually this means that the
> library in question was compiled incorrectly. However, I haven't been able
> to find anyone who's had the same issue, or any documented compile time
> defines that look like they deal with this. If anybody knows how to fix this
> or has any suggestions, it would be much appreciated.
>
> Thanks,
> Matt
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list