[vtkusers] dll not found, unresolved externals, VTK 5.4.2, CMake 2.6, VS2008

Chris Nater mansch2001 at yahoo.com
Fri Jun 26 07:59:12 EDT 2009


Hi all,

I have followed all the instructions for compiling and installing VTK 5.4.2 from source. CMake 2.6 was used to set the targets and I chose to BUILD_EXAMPLES and WRAP_TCL.

ALL_BUILD was built inside VS2008, no errors and subsequently INSTALL was built, also no errors. I set the lib and include folders into VS2008 VC++ Directories from the newly created CMAKE_INSTALL_PREFIX.

I have run Peter's minimal VTK C++ project at http://code.hkpeterpeter.googlepages.com/vtk_minimal.zip (who runs a site with help for people compiling VTK from source to C++), and I get a Windows error "Unable to Locate Component", in this case "vtkFiltering.dll was not found". Where are these dlls in the first place? Do I need to manually move them to the Windows/system32 folder?

Furthermore, my own VS2008 project has other issues with VTK. I #include vtkImageReader.h (which by itself compiles fine) but when I instantiate it with vtkImageReader::New(), I get a fatal "unresolved external symbol" error**. What else do I need to include?

I tried #pragma comment(lib,"vtkIO.lib"), but that seems to send msvcprt.lib into disarray, stating that suddenly all the calls to stdlib and stdio functions in my program are "already defined", e.g. ***.

What is going on here? Have I not installed VTK properly? Any thoughts or questions on this would be greatly appreciated. Thanks very much to all reading this long email.

Best regards,
Chris



** myclass.obj : error LNK2019: unresolved external symbol "public: static class vtkImageReader * __cdecl vtkImageReader::New(void)" (?New at vtkImageReader@@SAPAV1 at XZ) referenced in function "private: unsigned char * __thiscall myclass::loadRawFile(void)" (?loadRawFile at myclass@@AAEPAEXZ)


*** msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: class std::basic_istream<char,struct std::char_traits<char> > & __thiscall std::basic_istream<char,struct std::char_traits<char> >::seekg(long,int)" (?seekg@?$basic_istream at DU?$char_traits at D@std@@@std@@QAEAAV12 at JH@Z) already defined in myclass.obj



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090626/d8f3a181/attachment.htm>


More information about the vtkusers mailing list