[CMake] compilation errors of a program that uses VTK and GDCM via CMake

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Oct 8 04:57:27 EDT 2008


On Tue, Oct 7, 2008 at 8:21 PM, Stéphane CALANDE <scalande at gmail.com> wrote:
> Hi,
>
>
> I'm trying to compile a source c++ that uses VTK and GDCM libraries (
> http://info.fundp.ac.be/~scalande/problem/gdcmorthoplanes.cxx if it is
> useful... ).
>
> I have installed the last versions of VTK and GDCM, and I use CMake to
> generate the Makefile. (I'm on Windows)
> But, when I compile, I always meet the same errors, even if I take other
> example files.
> The errors I receive are "multiple definition of"...
>
> I'm a newbie and I have tried everything today to manage to compile my
> examples but without any result.
>
>
> In order to be easier to understand the problem I meet, I created a little
> .png file that summarize my problem.
> http://info.fundp.ac.be/~scalande/problem/error01.PNG
>
>
> I would really appreciate it if someone could help me by explaining me the
> problem or by giving solutions to resolve it.

In other word. Stephane is trying to link an executable to a static
lib (libvtkgdcm.a) which also links to vtk (libvtkRendering.a), and
this executable requires the use of symbols from libvtkWidgets.a. when
doing the link on mingw, this gives an error message about duplicate
symbols. Since I am not at expert at both (mingw / static) I suggested
to post the question here.

Thanks,
-- 
Mathieu


More information about the CMake mailing list