Let'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"><<a href="mailto:chuck.lloyd@gmail.com">chuck.lloyd@gmail.com</a>></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'm recompiling with 2005 to see if that makes a difference. I had a<br>
similar problem using nmake.<br>
<br>
I'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="1" -DITK_USE_CONSOLIDATED_MORPHOLOGY:BOOL="1"<br>
-DBUILDNAME:STRING="Win32-vs8"<br>
<br>
<br>
On Fri, May 21, 2010 at 8:30 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
> I don't think you should be copying the dll. You should set your path<br>
> to the location of the dll.<br>
><br>
> Bill<br>
><br>
> On Thu, May 20, 2010 at 5:14 PM, Chuck Lloyd <<a href="mailto:chuck.lloyd@gmail.com">chuck.lloyd@gmail.com</a>> wrote:<br>
>> I’m hoping someone can help. I’m not having a lot of luck tracking this down.<br>
>><br>
>> Any program more complex than than HelloWorld.cxx, such as<br>
>> Examples\DataRepresentation\Image\Image5.cxx, will terminate<br>
>> with an exception when I run it. I’ve been able to duplicate the same<br>
>> behavior with Testing\Code\BasicFilters\itkImportImageTest.cxx.<br>
>><br>
>> Here’s what I do.<br>
>><br>
>> Get 3.18 zip of ITK.<br>
>> Unzip it.<br>
>> Make buildir<br>
>> Run CMAKE 2.8.1 to make a visual studio 2008 solution in builddir (Win32-vs9)<br>
>> Build ALL_BUILD<br>
>> Build RUN_TESTS (Only a few fail)<br>
>> Build Package<br>
>> Install Package<br>
>><br>
>> Make simple dir with itkImportImageTest.cxx and simple CMakelists.txt<br>
>> from HelloWorld.cxx.<br>
>> Change itkImportImageTest() to main() in cxx file.<br>
>> Make solution (Point CMAKE at installed ITK)<br>
>> Build solution (Linker warning about adding /nodefaultlib:MSVCRT, but<br>
>> that doesn’t fix this either)<br>
>> Copy ITKCommon.dll from installation to Debug dir<br>
>> Run itkImportImageTest.exe in Debug dir.<br>
>> Get exception in some basic string operation in gdcm:DictSet:BuildDictPath<br>
>><br>
>> This test passed when run from the RUN_TESTS target in the original build.<br>
>><br>
>> This entire process works find with the Mingw compiler that comes<br>
>> with QtCreator.<br>
>><br>
>> I’m down to comparing the .vcproj files but that isn’t helping so far.<br>
>> I’m hoping someone can help.<br>
>><br>
>> Chuck Lloyd<br>
>> Software Architect<br>
>> Reveal Imaging<br>
>> Chuck.Lloyd at revealimaging dot com<br>
<div class="im">>> _____________________________________<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>
<div class="im">>><br>
><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>