[vtkusers] Odd linking errors when using the IO library with C++

Morten Stakkeland stakkela at student.matnat.uio.no
Fri Sep 24 09:09:36 EDT 2004


Hi,

I am trying to set up VTK 4.2 in a cygwin environment in windows XP (for
the first time). Everything seems to work perfectly, except when I try
importing any class from the IO-library. For instance when trying to
compile the following code:

#include<vtkTIFFReader.h>
int main()
{
    vtkTIFFReader* test=vtkTIFFReader::New();
}

I get the following output:

$ make
Building dependencies cmake.check_depends...
-- Loading VTK CMake commands
-- Loading VTK CMake commands - done
Building object file MarFrame.o...
Building executable /cygdrive/p/visual/mar_envir/MarFrame.exe...
MarFrame.o(.text+0x1f):MarFrame.cpp: undefined reference to
`__imp___ZN13vtkTIFFReader3NewEv'
collect2: ld returned 1 exit status
make[1]: *** [/cygdrive/p/visual/mar_envir/MarFrame.exe] Error 1
make: *** [default_target] Error 2

The same linking error appears whenever I try to instantiate a class from
the IO library. Any help would be appreciated...


Regards,
Morten



More information about the vtkusers mailing list