[vtkusers] Linking problem using vtk 5.0 with gcc and eclipse CDT on Mac OS

Linwei Wang lxw4393 at rit.edu
Tue Oct 30 15:26:16 EDT 2007


Dear all,

    I used to use VTK on windows with C++, and recently I'm trying to  
switch to Mac OS 10.4.6..I'm using gcc with Eclipse CDT, and I've run  
into some situations similar to some articles I searched here. But I  
couldn't find a solution to it.....This should be a linking  
problem..... I've added the header & library file to the include and  
link path..but there are still all "undefined symbol"......Actually  
when I try  to use matlab engine in another program it got the same  
linking problem of "undefined symbol"~~~I think it should be related  
to the library linking problem, but I could not figure out the  
reason....

  After compiling, the linking error simply shows as:
*** Build of configuration Debug for project VTKTest ****

make all
Building target: VTKTest
Invoking: MacOS X C++ Linker
g++ -L/Users/maomaowlw/Develop/VTKBuild/bin -o "VTKTest"  ./ 
Rendering.o ./compare.o ./interactive.o ./srendering.o ./tool.o ./ 
vrendering.o
/usr/bin/ld: Undefined symbols:
vtkDataSet::GetScalarRange()
vtkRenderer::New()
vtkRenderer::AddActor(vtkProp*)
vtkAlgorithm::GetOutputPort(int)
vtkTIFFWriter::New()
vtkClipDataSet::New()
vtkLookupTable::SetTableRange(double*)
vtkLookupTable::SetNumberOfTableValues(int)
vtkLookupTable::New()
vtkRenderWindow::New()
vtkGeometryFilter::New()
vtkPolyDataMapper::New()
vtkPolyDataMapper::SetInput(vtkPolyData*)
vtkPolyDataNormals::New()
vtkUnstructuredGrid::New()
vtkPolyDataAlgorithm::SetInput(vtkDataObject*)
vtkPolyDataAlgorithm::GetOutput()
vtkWindowToImageFilter::New()
vtkWindowToImageFilter::SetInput(vtkWindow*)
vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)
vtkRenderWindowInteractor::New()
vtkUnstructuredGridAlgorithm::SetInput(vtkDataObject*)
vtkUnstructuredGridAlgorithm::GetOutput()
vtkActor::New()
vtkPlane::New()
vtkCutter::New()
vtkMapper::SetLookupTable(vtkScalarsToColors*)
vtkProp3D::AddPosition(double, double, double)
vtkProp3D::RotateX(double)
vtkProp3D::RotateZ(double)
vtkPolyData::New()
vtkPointWidget::GetPolyData(vtkPolyData*)
vtkPointWidget::New()
vtkProbeFilter::New()
vtkProbeFilter::SetSource(vtkDataObject*)
vtkPointLocator::New()
vtkDataSetAlgorithm::SetInput(vtkDataSet*)
vtkDataSetAlgorithm::GetOutput()
vtkIdList::New()
vtkActor2D::SetWidth(double)
vtkActor2D::SetHeight(double)
vtkProperty::New()
vtkProperty::SetColor(double, double, double)
vtkLookupTable::SetTableValue(int, double, double, double, double)
vtkTextProperty::New()
vtkContourFilter::New()
vtkContourValues::GenerateValues(int, double, double)
vtkDataSetMapper::New()
vtkDataSetMapper::SetInput(vtkDataSet*)
vtkRotationFilter::New()
vtkScalarBarActor::New()
vtkTransformFilter::New()
vtkAbstractTransform::Update()
vtkPointSetAlgorithm::SetInput(vtkPointSet*)
vtkPointSetAlgorithm::GetOutput()
vtkSmoothPolyDataFilter::New()
vtkIterativeClosestPointTransform::New()
vtkIterativeClosestPointTransform::SetSource(vtkDataSet*)
vtkIterativeClosestPointTransform::SetTarget(vtkDataSet*)
vtkActor::GetProperty()
vtkActor::SetProperty(vtkProperty*)
vtkProp3D::RotateY(double)
vtkPolyData::InsertNextCell(int, int, int*)
vtkPolyData::Allocate(int, int)
vtkRenderer::ResetCamera()
vtkCellArray::New()
vtkDoubleArray::New()
vtkUnstructuredGrid::InsertNextCell(int, vtkIdList*)
vtkDataArrayTemplate<double>::SetNumberOfValues(int)
vtkDataArrayTemplate<int>::WritePointer(int, int)
vtkDataSetAttributes::SetScalars(vtkDataArray*)
vtkTetra::New()
vtkPoints::New()
vtkRenderer::GetActiveCamera()
vtkRenderer::AddLight(vtkLight*)
vtkRenderer::AddVolume(vtkProp*)
vtkVolumeProperty::SetScalarOpacity(int, vtkPiecewiseFunction*)
vtkVolumeProperty::New()
vtkVolumeProperty::SetColor(int, vtkColorTransferFunction*)
vtkPiecewiseFunction::New()
vtkPiecewiseFunction::AddPoint(double, double)
vtkColorTransferFunction::AddRGBPoint(double, double, double, double)
vtkColorTransferFunction::New()
vtkUnstructuredGridVolumeRayCastMapper::New()
vtkUnstructuredGridBunykRayCastFunction::New()
vtkLight::New()
vtkCamera::SetPosition(double, double, double)
vtkCamera::SetFocalPoint(double, double, double)
vtkCamera::ComputeViewPlaneNormal()
vtkCamera::SetViewUp(double, double, double)
vtkVolume::SetProperty(vtkVolumeProperty*)
vtkVolume::New()
vtkVolume::SetMapper(vtkAbstractVolumeMapper*)
collect2: ld returned 1 exit status
make: *** [VTKTest] Error 1

Is there anyone familiar with this problem?? I've spent much time to  
figure it out...I will be very appreciated with your help

Sincerely,
Linwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071030/76cb8131/attachment.htm>


More information about the vtkusers mailing list