[vtkusers] vtkMarchingCubes error

Amy Henderson amy.henderson at kitware.com
Mon Feb 23 16:38:44 EST 2004


At 04:31 PM 2/23/2004, Vetria Byrd wrote:
>here is my CMakeLists.txt file
>
>PROJECT (headbone)
>
>INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
>IF (USE_VTK_FILE)
>   INCLUDE(${USE_VTK_FILE})
>ENDIF (USE_VTK_FILE)
>
>ADD_EXECUTABLE(headbone headbone.cxx)
>
>TARGET_LINK_LIBRARIES(headbone vtkHybrid vtkMarchingCubes)

vtkMarchingCubes is not a library, so the above line should be
TARGET_LINK_LIBRARIES(headbone vtkHybrid vtkPatented)

- Amy



>Now when I compile I get the following error message:
>
>Building executable /mz/hd/byrdv/headbone/headbone...
>/hf/local/sparc-sun-solaris2.6/bin/ld: cannot open -lvtkMarchingCubes: No 
>such
>file or directory
>collect2: ld returned 1 exit status
>
>Vetria
>
> >Delivered-To: vtkusers at vtk.org
> >X-Sender: amy.henderson at kitware.com@pop.biz.rr.com
> >To: Vetria Byrd <byrdv at cis.uab.edu>, Amy Henderson 
> <amy.henderson at kitware.com>
> >From: Amy Henderson <amy.henderson at kitware.com>
> >Subject: Re: [vtkusers] vtkMarchingCubes error
> >Cc: vtkusers at vtk.org
> >Mime-Version: 1.0
> >X-BeenThere: vtkusers at vtk.org
> >X-Mailman-Version: 2.0.11
> >List-Help: <mailto:vtkusers-request at vtk.org?subject=help>
> >List-Post: <mailto:vtkusers at vtk.org>
> >List-Subscribe: <http://www.vtk.org/mailman/listinfo/vtkusers>,
><mailto:vtkusers-request at vtk.org?subject=subscribe>
> >List-Id: <vtkusers.vtk.org>
> >List-Unsubscribe: <http://www.vtk.org/mailman/listinfo/vtkusers>,
><mailto:vtkusers-request at vtk.org?subject=unsubscribe>
> >List-Archive: <http://www.vtk.org/pipermail/vtkusers/>
> >Date: Mon, 23 Feb 2004 14:45:19 -0500
> >X-Keywords:
> >
> >Did you link the patented library into your application?
> >- Amy
> >
> >At 02:36 PM 2/23/2004, Vetria Byrd wrote:
> >>Yes, VTK was built with patented support.
> >>What do I do now?
> >>
> >>Thank you,
> >>Vetria
> >>
> >>On Mon, 23 Feb 2004, Amy Henderson wrote:
> >>
> >> > Vetria,
> >> >
> >> > Is your VTK built with patented support? vtkMarchingCubes is in the
> >> > Patented directory, which is not built by default.
> >> >
> >> > - Amy
> >> >
> >> > At 12:33 PM 2/23/2004, Vetria Byrd wrote:
> >> > >I am trying to compile C++ code using vtkMarching Cubes.
> >> > >
> >> > >Here's some of the code:
> >> > >
> >> > >#include "vtkMarchingCubes.h"
> >> > >:
> >> > >:
> >> > >
> >> > >vtkVolume16Reader *v16 = vtkVolume16Reader::New();
> >> > >    v16->SetDataDimensions(128,128);
> >> > >    v16->GetOutput()->SetOrigin(0.0,0.0,0.0);
> >> > >    v16->SetDataByteOrderToLittleEndian();
> >> > >    v16->SetFilePrefix("/headsq/half");
> >> > >    v16->SetImageRange(1,93);
> >> > >    v16->SetDataSpacing(1.6,1.6,1.5);
> >> > >
> >> > >vtkMarchingCubes *iso = vtkMarchingCubes::New();
> >> > >    iso->SetInput(v16->GetOutput() );
> >> > >    iso->SetValue(0,1150);
> >> > >
> >> > >
> >> > >Which generates the following error messages:
> >> > >
> >> > >Building executable /mz/hd/byrdv/headbone/headbone...
> >> > >headbone.o: In function `main':
> >> > >headbone.o(.text+0x1d4): undefined reference to
> >> `vtkMarchingCubes::New(void)'
> >> > >headbone.o(.text+0x234): undefined reference to
> >> > >`vtkMarchingCubes::SetValue(int, float)'
> >> > >collect2: ld returned 1 exit status
> >> > >
> >> > >I have included vtkMarchingCubes.h along with other needed .h files.
> >> > >Not sure what the problem is. Any assistance would be greatly 
> appreciated.
> >> > >
> >> > >Thank you,
> >> > >Vetria
> >> > >
> >> > >_______________________________________________
> >> > >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:
> >> > >http://www.vtk.org/mailman/listinfo/vtkusers
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > 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:
> >> > http://www.vtk.org/mailman/listinfo/vtkusers
> >> >
> >
> >
> >
> >_______________________________________________
> >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:
> >http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list