Closed cmaurini closed 9 years ago
Just pushed your suggested patch.
Those linking errors you are seeing - I believed that I had already resolved those. Can you pull, rm CMakeCache.txt and try again please?
I did it, but I still have the same error. Do I need to compile VTK with special options? I tried adding c++11, but nothing change. After compiling with -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
this is the compiler call giving the error:
dhcp34-208:pragmatic maurini$ /usr/local/bin/mpicxx -std=c++11 -Wno-literal-suffix -Wno-deprecated -dynamiclib -Wl,-headerpad_max_install_names -o lib/libpragmatic.dylib -install_name /Users/maurini/Documents/MyDoc/WIP/codes/pragmatic/lib/libpragmatic.dylib CMakeFiles/pragmatic.dir/src/cpragmatic.cpp.o CMakeFiles/pragmatic.dir/src/generate_Steiner_ellipse_3d.cpp.o CMakeFiles/pragmatic.dir/src/mpi_tools.cpp.o CMakeFiles/pragmatic.dir/src/ticker.cpp.o -lmetis
Undefined symbols for architecture x86_64:
"vtkIntArray::New()", referenced from:
vtkSmartPointer<vtkIntArray>::New() in cpragmatic.cpp.o
"vtkDataArray::GetTuple1(long long)", referenced from:
VTKTools<double>::import_vtu(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in cpragmatic.cpp.o
"vtkDataArray::SetTuple1(long long, double)", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkDataArray::SetTuple3(long long, double, double, double)", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkDataArray::SetTuple4(long long, double, double, double, double)", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkDataArray::SetTuple9(long long, double, double, double, double, double, double, double, double, double)", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkFieldData::AddArray(vtkAbstractArray*)", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkFieldData::GetArray(char const*, int&)", referenced from:
vtkFieldData::GetArray(char const*) in cpragmatic.cpp.o
"vtkXMLWriter::SetInputData(vtkDataObject*)", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkXMLWriter::Write()", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkDoubleArray::New()", referenced from:
vtkSmartPointer<vtkDoubleArray>::New() in cpragmatic.cpp.o
"vtkIdTypeArray::New()", referenced from:
vtkSmartPointer<vtkIdTypeArray>::New() in cpragmatic.cpp.o
"vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*)", referenced from:
vtkSmartPointer<vtkDoubleArray>::vtkSmartPointer(vtkDoubleArray*) in cpragmatic.cpp.o
"vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, vtkSmartPointerBase::NoReference const&)", referenced from:
vtkSmartPointer<vtkXMLUnstructuredGridReader>::vtkSmartPointer(vtkXMLUnstructuredGridReader*, vtkSmartPointerBase::NoReference const&) in cpragmatic.cpp.o
vtkSmartPointer<vtkXMLPUnstructuredGridReader>::vtkSmartPointer(vtkXMLPUnstructuredGridReader*, vtkSmartPointerBase::NoReference const&) in cpragmatic.cpp.o
vtkSmartPointer<vtkUnstructuredGrid>::vtkSmartPointer(vtkUnstructuredGrid*, vtkSmartPointerBase::NoReference const&) in cpragmatic.cpp.o
vtkSmartPointer<vtkXMLPUnstructuredGridWriter>::vtkSmartPointer(vtkXMLPUnstructuredGridWriter*, vtkSmartPointerBase::NoReference const&) in cpragmatic.cpp.o
vtkSmartPointer<vtkIdTypeArray>::vtkSmartPointer(vtkIdTypeArray*, vtkSmartPointerBase::NoReference const&) in cpragmatic.cpp.o
vtkSmartPointer<vtkUnsignedCharArray>::vtkSmartPointer(vtkUnsignedCharArray*, vtkSmartPointerBase::NoReference const&) in cpragmatic.cpp.o
vtkSmartPointer<vtkXMLUnstructuredGridWriter>::vtkSmartPointer(vtkXMLUnstructuredGridWriter*, vtkSmartPointerBase::NoReference const&) in cpragmatic.cpp.o
...
"vtkSmartPointerBase::~vtkSmartPointerBase()", referenced from:
vtkSmartPointer<vtkUnstructuredGrid>::~vtkSmartPointer() in cpragmatic.cpp.o
vtkSmartPointer<vtkXMLUnstructuredGridReader>::~vtkSmartPointer() in cpragmatic.cpp.o
vtkSmartPointer<vtkXMLPUnstructuredGridReader>::~vtkSmartPointer() in cpragmatic.cpp.o
vtkSmartPointer<vtkPoints>::~vtkSmartPointer() in cpragmatic.cpp.o
vtkSmartPointer<vtkIntArray>::~vtkSmartPointer() in cpragmatic.cpp.o
vtkSmartPointer<vtkUnsignedCharArray>::~vtkSmartPointer() in cpragmatic.cpp.o
vtkSmartPointer<vtkIdTypeArray>::~vtkSmartPointer() in cpragmatic.cpp.o
...
"vtkSmartPointerBase::operator=(vtkSmartPointerBase const&)", referenced from:
vtkSmartPointer<vtkDoubleArray>::operator=(vtkSmartPointer<vtkDoubleArray>&&) in cpragmatic.cpp.o
"vtkUnstructuredGrid::New()", referenced from:
vtkSmartPointer<vtkUnstructuredGrid>::New() in cpragmatic.cpp.o
"vtkDataSetAttributes::SetGlobalIds(vtkDataArray*)", referenced from:
VTKTools<double>::export_vtu(char const*, Mesh<double> const*, double const*) in cpragmatic.cpp.o
"vtkUnsignedCharArray::New()", referenced from:
vtkSmartPointer<vtkUnsignedCharArray>::New() in cpragmatic.cpp.o
"vtkXMLUnstructuredGridReader::New()", referenced from:
vtkSmartPointer<vtkXMLUnstructuredGridReader>::New() in cpragmatic.cpp.o
"vtkXMLUnstructuredGridReader::GetOutput()", referenced from:
VTKTools<double>::import_vtu(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in cpragmatic.cpp.o
"vtkXMLUnstructuredGridWriter::New()", referenced from:
vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New() in cpragmatic.cpp.o
"vtkXMLPUnstructuredGridReader::New()", referenced from:
vtkSmartPointer<vtkXMLPUnstructuredGridReader>::New() in cpragmatic.cpp.o
"vtkXMLPUnstructuredGridReader::GetOutput()", referenced from:
VTKTools<double>::import_vtu(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in cpragmatic.cpp.o
"vtkXMLPUnstructuredGridWriter::New()", referenced from:
vtkSmartPointer<vtkXMLPUnstructuredGridWriter>::New() in cpragmatic.cpp.o
"vtkPoints::New()", referenced from:
vtkSmartPointer<vtkPoints>::New() in cpragmatic.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Fixed
I get the following error at linking time when using
clang
on macosxThis is the output of
cmake
configure step:I also suggest to add lines as the following to cmake for the different modules, so as it is easier to debug.