converting 32bit application to 64bit causes VTK problems

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

converting 32bit application to 64bit causes VTK problems

thorbjorn88
I'm trying to build an application which was originally written for 32 bit with 64 bit for memory needs. This application uses Qt 4.8.5 and VTK 6.1. I am using 64 bit versions of those libraries which in general seem to be working. There are about 5 VTK functions which are giving unresolved external errors despite all other VTK externals working correctly. One function causes these errors. Why is this unresolved when other externals work? Why does it think I'm trying to use (int,int,int *) as my arguments when I'm clearly using (int,int,vtkIdType*)?

Error 2 error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl vtkPolyData::InsertNextCell(int,int,int *)" (__imp_?InsertNextCell@vtkPolyData@@QEAAHHHPEAH@Z)

Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl vtkPolyData::InsertNextCell(int,int,int *)" (__imp_?InsertNextCell@vtkPolyData@@QEAAHHHPEAH@Z) referenced in function "public: void __cdecl cailAcu::loadAcu(class QString,class QVector &)" (?loadAcu@cailAcu@@QEAAXVQString@@AEAV?$QVector@PEAVvtkDataSet@@@@@Z

the code these erros reference is as follows

vtkIdType * id = new vtkIdType[numPoints];
for (vtkIdType i = 0; i<numPoints; i++) {
    id[i] = i;
}

//some other stuff then....
vtkPolyData *dataSet =vtkPolyData::New();
dataSet->Allocate(1,1);
for(int x=0; x<numPoints; x++) {
    //dataSet->InsertNextCell(2, numPoints, id);  //old function used for inserting a scan per cell
    dataSet->InsertNextCell(2, 1, &id[x]);
}