<div dir="ltr">Hi,<div><br></div><div>I am trying to build a C++ code called LAMMPS which uses VTK for writing vtk files. I am getting errors that seem like linking errors. I am able to compile VTK successfully, but when I compile the LAMMPS code, I get the following errors from the line </div>
<div><span style="color:rgb(192,192,192)"> </span>vtkSmartPointer<span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkXMLPolyDataWriter</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">writer</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span>vtkSmartPointer<span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkXMLPolyDataWriter</span><span style="color:rgb(0,0,0)">>::</span>New<span style="color:rgb(0,0,0)">();</span></div><div><span style="color:rgb(0,0,0)"></span>:</div><div><br></div><div><div style="font-size:12.8px"><div>mpicxx -g -O -L/home/sthomas/projects/VTK-<wbr>build/lib <span style="font-size:12.8px">dump_custom_vtk.o </span>..............................<wbr>............ -lvtkCommonCore-6.3 -lvtkIOCore-6.3 -lvtkIOXML-6.3 -lvtkIOLegacy-6.3 -lvtkCommonDataModel-6.3 -lblas -llapack -o ../lmp_mpi</div><span class="gmail-im">dump_custom_vtk.o: In function `vtkSmartPointer<<wbr>vtkXMLPPolyDataWriter>::New()'<wbr>:</span><div>/usr/local/include/vtk-6.3/<wbr>vtkSmartPointer.h:117: undefined reference to `vtkXMLPPolyDataWriter::New()'</div><span class="gmail-im">dump_custom_vtk.o: In function `vtkSmartPointer<<wbr>vtkXMLPUnstructuredGridWriter><wbr>::New()':</span><div>/usr/local/include/vtk-6.3/<wbr>vtkSmartPointer.h:117: undefined reference to `<wbr>vtkXMLPUnstructuredGridWriter:<wbr>:New()'</div><div>collect2: error: ld returned 1 exit status</div><div><br></div><div>This is the first time I am writing to this forum. I may be missing some supporting information. Please let me know if more information is required. </div><div><br></div><div>I must also point out that I have another code installed on the machine which has also installed VTK 7.0 and its shared libraries. I am not sure if these are somehow interfering. I am assuming that the -L/path_to_lib as seen above should take care of pointing to the right libraries.</div><div><br></div><div>Thank you,</div><div>Stephen Thomas.</div><div><br></div></div></div></div>