I have successfully build and run my program without any error. The 
problem simply lies within the builds. The problem is cmake takes an 
incorrect path for vtk, in this case, vtk of Yale's Bio Image Suite. 
When I use cmake with gdcm, it takes the vtk from the Bio Image Suite, 
thus resulting in an invalid build for me. I removed all Bio Image 
Suite, vtk and gdcm (as well as any associating system path), and 
restart by cmake and compile vtk first, then cmake and compile gdcm (of 
course, with the GDCM_USE_VTK turned on). Shared lib option is also 
enabled for both libraries. Finally, I put the paths to the libraries in
 the system path.<br>
<br>OK, the problem is solved. :-)<br><br><div class="gmail_quote">On Sun, Jan 23, 2011 at 5:56 PM, iono sphere <span dir="ltr"><<a href="mailto:999ionospheres@gmail.com">999ionospheres@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br><br>I have some classes that require both VTK and GDCM together (ex. vtkGDCMImageReader). I am just wondering when I build the sources, are there any specific version of both libraries that may not work? <br>
<br>Right now, it seems that my project only works under DEBUG setting with C:\yale\bioimagesuite3_base\vtk52\include\vtk-5.2 along with several more gdcm include directories as additional include directories. Now, if I build it as RELEASE, I will get a Access Violation Error. The current setting is that I use include files of vtk 5.2 from Bio Image Suite and use additional dependecies (.lib) and .dll files of vtk version 5.6.1. This is a contradictory, but the program works... and it only works under DEBUG build.<br>

<br>However, if I try remove all vtk-5.2 business out (I go as far as removing the "path" in "environment variables" and put all of recently built GDCM and VTK dll files next to the executable), and use vtk 5.6 that I built, I will get this runtime error:<br>

<br>The procedure entry point ?CollectRevisions@vtkLookupTable@@MAEXAAV?$basic_ostream@DU?char_traits@D@std@@@std@@@Z could not be located in the dynamic link library vtkCommon.dll<br><br>Am I building both VTK and GDCM incorrectly? Or am I missing something here? Any suggestion is highly appreciated.<br>

</blockquote></div><br>