Let&#39;s see if I am understanding this correctly ... You have an ITK installation that builds under VS 2008 and which passes (most) of the ITK tests when ctest is run in the build directory.  When you create an external project based on Image5.cxx and build that pointing to your ITK build, the executable does not run.  Correct?<div>
<br></div><div>One quick question: Did you build your external project with the same compiler settings as ITK (Debug/Debug or Release/Release, etc.)?  VS does not like to mix release and debug in the same executable and strange errors can result.</div>
<div><br></div><div>- Wes<br><br><div class="gmail_quote">On Fri, May 21, 2010 at 9:43 AM, Chuck Lloyd <span dir="ltr">&lt;<a href="mailto:chuck.lloyd@gmail.com">chuck.lloyd@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks for the quick response Bill.<br>
<br>
I deleted ITKCommon.dll from the dir and added C:\Program Files\ITK\bin<br>
to the path but I still get the same issue.<br>
<br>
I&#39;m recompiling with 2005 to see if that makes a difference. I had a<br>
similar problem using nmake.<br>
<br>
I&#39;m using a fairly vanilla config but I am trying to include the<br>
optimized kernel code. CMake reports these changes.<br>
<br>
-DITK_USE_REVIEW:BOOL=&quot;1&quot; -DITK_USE_CONSOLIDATED_MORPHOLOGY:BOOL=&quot;1&quot;<br>
-DBUILDNAME:STRING=&quot;Win32-vs8&quot;<br>
<br>
<br>
On Fri, May 21, 2010 at 8:30 AM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt; wrote:<br>
&gt; I don&#39;t think you should be copying the dll. You should set your path<br>
&gt; to the location of the dll.<br>
&gt;<br>
&gt; Bill<br>
&gt;<br>
&gt; On Thu, May 20, 2010 at 5:14 PM, Chuck Lloyd &lt;<a href="mailto:chuck.lloyd@gmail.com">chuck.lloyd@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I’m hoping someone can help. I’m not having a lot of luck tracking this down.<br>
&gt;&gt;<br>
&gt;&gt; Any program more complex than than HelloWorld.cxx, such as<br>
&gt;&gt; Examples\DataRepresentation\Image\Image5.cxx, will terminate<br>
&gt;&gt; with an exception when I run it. I’ve been able to duplicate the same<br>
&gt;&gt; behavior with Testing\Code\BasicFilters\itkImportImageTest.cxx.<br>
&gt;&gt;<br>
&gt;&gt; Here’s what I do.<br>
&gt;&gt;<br>
&gt;&gt; Get 3.18 zip of ITK.<br>
&gt;&gt; Unzip it.<br>
&gt;&gt; Make buildir<br>
&gt;&gt; Run CMAKE 2.8.1 to make a visual studio 2008 solution in builddir (Win32-vs9)<br>
&gt;&gt; Build ALL_BUILD<br>
&gt;&gt; Build RUN_TESTS (Only a few fail)<br>
&gt;&gt; Build Package<br>
&gt;&gt; Install Package<br>
&gt;&gt;<br>
&gt;&gt; Make simple dir with itkImportImageTest.cxx and simple CMakelists.txt<br>
&gt;&gt; from HelloWorld.cxx.<br>
&gt;&gt; Change itkImportImageTest() to main() in cxx file.<br>
&gt;&gt; Make solution (Point CMAKE at installed ITK)<br>
&gt;&gt; Build solution (Linker warning about adding /nodefaultlib:MSVCRT, but<br>
&gt;&gt; that doesn’t fix this either)<br>
&gt;&gt; Copy ITKCommon.dll from installation to Debug dir<br>
&gt;&gt; Run itkImportImageTest.exe in Debug dir.<br>
&gt;&gt; Get exception in some basic string operation in gdcm:DictSet:BuildDictPath<br>
&gt;&gt;<br>
&gt;&gt; This test passed when run from the RUN_TESTS target in the original build.<br>
&gt;&gt;<br>
&gt;&gt; This entire process works find  with the Mingw compiler that comes<br>
&gt;&gt; with QtCreator.<br>
&gt;&gt;<br>
&gt;&gt; I’m down to comparing the .vcproj files but that isn’t helping so far.<br>
&gt;&gt; I’m hoping someone can help.<br>
&gt;&gt;<br>
&gt;&gt; Chuck Lloyd<br>
&gt;&gt; Software Architect<br>
&gt;&gt; Reveal Imaging<br>
&gt;&gt; Chuck.Lloyd at revealimaging dot com<br>
<div class="im">&gt;&gt; _____________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
</div>&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<div class="im">&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
</div>&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<div class="im">&gt;&gt;<br>
&gt;<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
</div>Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<div class="im"><br>
Follow this link to subscribe/unsubscribe:<br>
</div><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920<br>
</div>