[vtkusers] Unresolved external using vtkImageReader, vtkImageReader2

Peter F Bradshaw pfb at exadios.com
Wed Nov 23 08:11:47 EST 2005


Hi Vetria;

On Tue, 22 Nov 2005, Vetria Byrd wrote:

> I am getting a linker error:  LNK2001: unresolved external symbol
> "__declspec(dllimport) public: static class vtkImageReader * __cdecl
> vtkImageReader::New(void)" (__imp_?New at vtkImageReader@@SAPAV1 at XZ)

I'm guessing that you are not linking against the appropriate library.
The one that contains vtkImageReader is libvtkIO.

Failing that there could be some weird problem your libvtkIO (like it
was compiled with a compiler other than the one you're using now).

>
>
>
> When I try to implement the following lines of code:
>
>
>
> vtkImageReader *volReader = vtkImageReader::New();
>
>  volReader->SetDataExtent(0,5,0,5,0,5);
>
>  volReader->SetFilePrefix("C:/data/slice");
>
>  volReader->SetDataSpacing(1,1,1);
>
>  volReader->Update();
>
>
>
> When I remove this block of code the code compiles.
>
> I am getting the same error message when I try using vtkImageReader2.
>
> If I modify the code to use vtkVolume16Reader I get the same linker error.
>
> The include files vtkImageReader.h, vtkImageReader2.h and
> vtkVolume16Reader.h are in the same location as all other .h files.
>
>
>
> Does anyone have any suggestions/solutions?
>
> _______________
>
> Vetria L. Byrd
>

Cheers

-- 
Peter F Bradshaw, http://www.exadios.com, ICQ 75431157 (exadios).
Public key at www.exadios.com/pfb.pgp.key and www.exadios.com/pfb.gpg.key
"I love truth, and the way the government still uses it occasionally to
 keep us guessing." - Sam Kekovich.



More information about the vtkusers mailing list