Hi I just found this thread which answers my question: http://www.cmake.org/pipermail/cmake/2004-December/005906.html
I put the ParaView bin directory in my System Path (Environment variable) and my application is able to start. Thanks. On Fri, Feb 18, 2011 at 7:08 PM, Alexis Chan <[email protected]>wrote: > Hi > > I set BUILD_SHARED_LIBS in CMAKE to TRUE when configuring ParaView. > > My test application uses the VTK library from ParaView. Here's the CMAKE > entry: > > FIND_PACKAGE( VTK REQUIRED ) > INCLUDE( ${VTK_USE_FILE} ) > SET( VTK_LIBS vtkRendering vtkIO) > > CMAKE autoloads the VTK directory as D:/alexisc/CompiledParaview/VTK > > I checked that all the required dlls and libs are in > D:\alexisc\CompiledParaview\bin\Release > > But when I compile my application in Microsoft Visual Studio I get the > following errors: > > Creating library > D:\alexisc\CompiledVTKInteractionDevice\lib\Release\vtkInteractionDevice.lib > and object > D:\alexisc\CompiledVTKInteractionDevice\lib\Release\vtkInteractionDevice.exp > 1>vtkVRPNTrackerStyleCamera.obj : error LNK2001: unresolved external symbol > "__declspec(dllimport) public: static int __cdecl vtkObject::IsTypeOf(char > const *)" (__imp_?IsTypeOf@vtkObject@@SAHPBD@Z) > 1>vtkWiiMoteStyleCamera.obj : error LNK2001: unresolved external symbol > "__declspec(dllimport) public: static int __cdecl vtkObject::IsTypeOf(char > const *)" (__imp_?IsTypeOf@vtkObject@@SAHPBD@Z) > 1>vtkWiiMoteStyle.obj : error LNK2001: unresolved external symbol > "__declspec(dllimport) public: static int __cdecl vtkObject::IsTypeOf(char > const *)" (__imp_?IsTypeOf@vtkObject@@SAHPBD@Z) > 1>vtkWin32RenderWindowDeviceInteractor.obj : error LNK2001: unresolved > external symbol "__declspec(dllimport) public: static int __cdecl > vtkObject::IsTypeOf(char const *)" (__imp_?IsTypeOf@vtkObject@@SAHPBD@Z) > > > If I set the Configuration Properties->General->Project > Defaults->Configuration Type from .dll to .lib, the compilation works. > > This means that it was able to detect vtkRendering.lib which is in > D:\alexisc\CompiledParaview\bin\Release > > But the application will not start because of missing vtkRendering.dll > which is also in D:\alexisc\CompiledParaview\bin\Release > > Do you have any idea why the application is not able to detect > vtkRendering.dll? > > Thanks. > > On Fri, Feb 18, 2011 at 4:12 PM, David Partyka > <[email protected]>wrote: > >> Yes, all libraries that ParaView builds including VTK will also be built >> shared. Let us know if you need any more help. >> >> On Fri, Feb 18, 2011 at 4:09 PM, Alexis Chan >> <[email protected]>wrote: >> >>> Hi >>> >>> I set BUILD_SHARED_LIBS in CMAKE to TRUE when building ParaView. Does >>> that mean that when it's building VTK for ParaView, the VTK is built with >>> shared libraries? >>> >>> >>> I am building a test application that uses the VTK from ParaView and it >>> would only compile when I changed the setting for the test application to >>> static libraries (instead of shared libraries). >>> >>> Thanks. >>> -- >>> Alexis YL Chan >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the ParaView Wiki at: >>> http://paraview.org/Wiki/ParaView >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.paraview.org/mailman/listinfo/paraview >>> >>> >> > > > -- > Alexis YL Chan > -- Alexis YL Chan http://alexisylchan.wordpress.com/<http://sites.google.com/site/alexisylchan/>
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
