[IGSTK-Users] VTK - dll issue
Patrick Cheng
cheng at isis.georgetown.edu
Fri Jan 15 11:21:22 EST 2010
Hi Stella,
Dynamic link library (DLL) reduces the footage of your final executable,
but it requires the linking at run-time. Meaning when you run a
executable program that depends on a dll, it needs to know where the dll
is located and link to it at startup.
In most operating system, the computer will automatically search in the
program start path (current directory) and then system path.
When compile IGSTK, CMake will handle the linking to vtk automatically.
But you will run into trouble starting a program that depends on VTK
dlls. There are three different solutions:
1. Add the path to vtk dlls into your system path variable
http://www.computerhope.com/issues/ch000549.htm
2. Copy vtk dlls into your executable directory
3. Copy/install vtk dlls into your system path
Let me know if this solves your problem.
Patrick
On 1/14/2010 2:53 AM, stella ang wrote:
> Hi all,
>
> I'm still have some problems setting/linking the dlls.
>
> I chanced upon this:
>
> http://www.cs.auckland.ac.nz/~jli023/vtk/BuildandinstallVTKbinaries.htm
>
> /Step 2/. Set up VS .Net 2003 by tell the IDE the directories that hold
> the vtk include header files and vtk library files. Go to Tools,
> Options, Projects. Select VC++ Directories, Under the list for Library
> files add: “C:\VTKBin42\bin\release”. Under the list for Include files add:
>
> *
> C:\Vtk\Common\
> * C:\Vtk\Filtering\
> * C:\Vtk\Graphics\
> * C:\Vtk\Hybrid\
> * C:\Vtk\Imaging\
> * C:\Vtk\IO\
> * C:\Vtk\Parallel\
> * C:\Vtk\Patented\
> *
> C:\Vtk\Rendering\
> *
> C:\Vtkbin\: this holds vtkConfigure.h file.
>
>
> Just wondering these include files are from building the VTK aftermath,
> or from the downloaded VTK-4.2-LatestRelease.zip?
>
> *I'm using Visual Studio 2005.*
>
> *At the Environment Variables, which path directory am I supposed to
> link? Am I supposed to change the "User variables for XP2" or "System
> variables"?
> *
> **
> Here's one of the examples that is giving problem (when I try to build it).
>
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded 'D:\New Folder_IGSTK
> 4-2\Sandbox-4-2\Sandbox-4-2\build\bin\debug\OpenIGTLinkTrackerBroadcasting.exe',
> Symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\vtkCommon.dll', Symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\vtksys.dll', Symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcast ing.exe': Loaded
> 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\secur32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting..exe': Loaded
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll',
> Symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll',
> Symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\wsock32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded 'C:\WINDOWS\system32\im
> m32.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\lpk.dll', No symbols loaded.
> 'OpenIGTLinkTrackerBroadcasting.exe': Loaded
> 'C:\WINDOWS\system32\usp10.dll', No symbols loaded.
> The program '[4360] OpenIGTLinkTrackerBroadcasting.exe: Native' has
> exited with code 1 (0x1).
>
> *So do I find these .dll files and then copy to c:/windows/system32?*
> **
>
> Thanks for your help.
>
> Regards,
> Stella
>
> ------------------------------------------------------------------------
> New Windows 7: Find the right PC for you. Learn more.
> <http://windows.microsoft.com/shop>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
More information about the IGSTK-Users
mailing list