<div dir="ltr"><div><div>Thanks a lot for the reply!<br><br></div>I am using USE_SYSTEM_DCMTK and an externally built <span class="">DCMTK</span> (latest git version) on Windows visual studio 2012. There is no problem <br>
at all for compiling ITK and ITK-based applications. There is just some warnings when trying to link under Debug build type. What I found is<br>the linking libraries related to DCMTK in CMake&#39;s ITK_LIBRARIES variable does not differentiate debug and release. For example, the ITK_LIBRARIES variable has something like<br>
D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmsr.lib;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmsr.lib;<br><br></div><div>To compare, ITKDCMTK_LIBRARIES variable has <br>optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmsr.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmsr.lib;<br>
</div><div>which could be used in TARGET_LINK_LIBRARIES command and should be able to solve the issue.<br><br></div><div>For the details for these variables, please see my previous email.<br></div><div><br></div>So I can help if you point to me where those &quot;optimized&quot; and &quot;debug&quot; keywords get lost when converting ITKDCMTK_LIBRARIES to ITK_LIBRARIES. I may be able to help.<br>
<br>Thanks,<br>Mengda<br><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 10:36 AM, Williams, Norman K <span dir="ltr">&lt;<a href="mailto:norman-k-williams@uiowa.edu" target="_blank">norman-k-williams@uiowa.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The problem is that no one who is A) A CMake Guru B) A Windows User and C)<br>
Patient enough to navigate the inevitable frustrations involved has really<br>
attacked getting DCMT linking to ITK on Windows.<br>
<br>
As it stands now, you need to use USE_SYSTEM_DCMTK and an externally built<br>
DCMTK to use DCMTK with ITK on Windows.  And I never figured out all the<br>
business with different build types on Windows.  Compared with how it<br>
works on Linux/OS X/Unix it&#39;s a real mess on Windows.  And it basically<br>
never worked to build inside Visual Studio for me; I ended up doing<br>
command line builds.<br>
<br>
Any insight or actual work to try and resolve this would be very welcome.<br>
The problem is in Modules/ThirdParty/DCMTK/CMakeLists.txt: We didn&#39;t<br>
figure out how to get the various MSVC model stuff into the import/export<br>
stuff when building up the CMake infrastructure for importing ITK from a<br>
build or install directory.<br>
<div><div class="h5"><br>
<br>
On 12/11/13 10:34 PM, &quot;Mengda Wu&quot; &lt;<a href="mailto:wumengda@gmail.com">wumengda@gmail.com</a>&gt; wrote:<br>
<br>
&gt;Just to follow up.... I did a little printing of the CMake variables.<br>
&gt;Here are the values for them. I am not sure why ITK_LIBRARIES throws away<br>
&gt;the &quot;optimized&quot; and &quot;debug&quot; keyword in ITKDCMTK_LIBRARIES or<br>
&gt;DCMTK_LIBRARIES.<br>
&gt;<br>
&gt;DCMTK_LIBRARIES:<br>
&gt;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmpstat.lib;debug;D:/L<br>
&gt;ibrary/DCMTK/dcmtk/Build/lib/Debug/dcmpstat.lib;optimized;D:/Library/DCMTK<br>
&gt;/dcmtk/Build/lib/Release/dcmsr.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/<br>
&gt;Debug/dcmsr.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmtls.<br>
&gt;lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmtls.lib;optimized;D:/L<br>
&gt;ibrary/DCMTK/dcmtk/Build/lib/Release/dcmqrdb.lib;debug;D:/Library/DCMTK/dc<br>
&gt;mtk/Build/lib/Debug/dcmqrdb.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib<br>
&gt;/Release/dcmnet.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/<a href="http://dcmnet.li" target="_blank">dcmnet.li</a><br>
&gt;b;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmjpeg.lib;debug;D:/<br>
&gt;Library/DCMTK/dcmtk/Build/lib/Debug/dcmjpeg.lib;optimized;D:/Library/DCMTK<br>
&gt;/dcmtk/Build/lib/Release/dcmimage.lib;debug;D:/Library/DCMTK/dcmtk/Build/l<br>
&gt;ib/Debug/dcmimage.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/d<br>
&gt;cmimgle.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmimgle.lib;opti<br>
&gt;mized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmdata.lib;debug;D:/Librar<br>
&gt;y/DCMTK/dcmtk/Build/lib/Debug/dcmdata.lib;optimized;D:/Library/DCMTK/dcmtk<br>
&gt;/Build/lib/Release/oflog.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/<br>
&gt;oflog.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/ofstd.lib;deb<br>
&gt;ug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/ofstd.lib;optimized;D:/Library/D<br>
&gt;CMTK/dcmtk/Build/lib/Release/ijg12.lib;debug;D:/Library/DCMTK/dcmtk/Build/<br>
&gt;lib/Debug/ijg12.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/ijg<br>
&gt;16.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/ijg16.lib;optimized;D:<br>
&gt;/Library/DCMTK/dcmtk/Build/lib/Release/ijg8.lib;debug;D:/Library/DCMTK/dcm<br>
&gt;tk/Build/lib/Debug/ijg8.lib;netapi32;wsock32<br>
&gt;<br>
&gt;<br>
&gt;ITKDCMTK_LIBRARIES:<br>
&gt;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmpstat.lib;debug;D:/L<br>
&gt;ibrary/DCMTK/dcmtk/Build/lib/Debug/dcmpstat.lib;optimized;D:/Library/DCMTK<br>
&gt;/dcmtk/Build/lib/Release/dcmsr.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/<br>
&gt;Debug/dcmsr.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmtls.<br>
&gt;lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmtls.lib;optimized;D:/L<br>
&gt;ibrary/DCMTK/dcmtk/Build/lib/Release/dcmqrdb.lib;debug;D:/Library/DCMTK/dc<br>
&gt;mtk/Build/lib/Debug/dcmqrdb.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib<br>
&gt;/Release/dcmnet.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/<a href="http://dcmnet.li" target="_blank">dcmnet.li</a><br>
&gt;b;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmjpeg.lib;debug;D:/<br>
&gt;Library/DCMTK/dcmtk/Build/lib/Debug/dcmjpeg.lib;optimized;D:/Library/DCMTK<br>
&gt;/dcmtk/Build/lib/Release/dcmimage.lib;debug;D:/Library/DCMTK/dcmtk/Build/l<br>
&gt;ib/Debug/dcmimage.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/d<br>
&gt;cmimgle.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmimgle.lib;opti<br>
&gt;mized;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmdata.lib;debug;D:/Librar<br>
&gt;y/DCMTK/dcmtk/Build/lib/Debug/dcmdata.lib;optimized;D:/Library/DCMTK/dcmtk<br>
&gt;/Build/lib/Release/oflog.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/<br>
&gt;oflog.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/ofstd.lib;deb<br>
&gt;ug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/ofstd.lib;optimized;D:/Library/D<br>
&gt;CMTK/dcmtk/Build/lib/Release/ijg12.lib;debug;D:/Library/DCMTK/dcmtk/Build/<br>
&gt;lib/Debug/ijg12.lib;optimized;D:/Library/DCMTK/dcmtk/Build/lib/Release/ijg<br>
&gt;16.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/ijg16.lib;optimized;D:<br>
&gt;/Library/DCMTK/dcmtk/Build/lib/Release/ijg8.lib;debug;D:/Library/DCMTK/dcm<br>
</div></div><div><div class="h5">&gt;tk/Build/lib/Debug/ijg8.lib;netapi32;wsock32<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;ITK_LIBRARIES:<br>
&gt;itkdouble-conversion;itksys;itkvnl_algo;itkvnl;itkv3p_netlib;ITKCommon;itk<br>
&gt;NetlibSlatec;ITKStatistics;ITKIOImageBase;ITKMesh;itkzlib;ITKMetaIO;ITKSpa<br>
&gt;tialObjects;ITKPath;ITKLabelMap;ITKQuadEdgeMesh;ITKOptimizers;ITKPolynomia<br>
&gt;ls;ITKBiasCorrection;ITKBioCell;optimized;D:/Library/DCMTK/dcmtk/Build/lib<br>
&gt;/Release/dcmpstat.lib;debug;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmpsta<br>
&gt;t.lib;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmsr.lib;D:/Library/DCMTK/<br>
&gt;dcmtk/Build/lib/Debug/dcmsr.lib;D:/Library/DCMTK/dcmtk/Build/lib/Release/d<br>
&gt;cmtls.lib;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmtls.lib;D:/Library/DCM<br>
&gt;TK/dcmtk/Build/lib/Release/dcmqrdb.lib;D:/Library/DCMTK/dcmtk/Build/lib/De<br>
&gt;bug/dcmqrdb.lib;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmnet.lib;D:/Lib<br>
&gt;rary/DCMTK/dcmtk/Build/lib/Debug/dcmnet.lib;D:/Library/DCMTK/dcmtk/Build/l<br>
&gt;ib/Release/dcmjpeg.lib;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmjpeg.lib;<br>
&gt;D:/Library/DCMTK/dcmtk/Build/lib/Release/dcmimage.lib;D:/Library/DCMTK/dcm<br>
&gt;tk/Build/lib/Debug/dcmimage.lib;D:/Library/DCMTK/dcmtk/Build/lib/Release/d<br>
&gt;cmimgle.lib;D:/Library/DCMTK/dcmtk/Build/lib/Debug/dcmimgle.lib;D:/Library<br>
&gt;/DCMTK/dcmtk/Build/lib/Release/dcmdata.lib;D:/Library/DCMTK/dcmtk/Build/li<br>
&gt;b/Debug/dcmdata.lib;D:/Library/DCMTK/dcmtk/Build/lib/Release/oflog.lib;D:/<br>
&gt;Library/DCMTK/dcmtk/Build/lib/Debug/oflog.lib;D:/Library/DCMTK/dcmtk/Build<br>
&gt;/lib/Release/ofstd.lib;D:/Library/DCMTK/dcmtk/Build/lib/Debug/ofstd.lib;D:<br>
&gt;/Library/DCMTK/dcmtk/Build/lib/Release/ijg12.lib;D:/Library/DCMTK/dcmtk/Bu<br>
&gt;ild/lib/Debug/ijg12.lib;D:/Library/DCMTK/dcmtk/Build/lib/Release/ijg16.lib<br>
&gt;;D:/Library/DCMTK/dcmtk/Build/lib/Debug/ijg16.lib;D:/Library/DCMTK/dcmtk/B<br>
&gt;uild/lib/Release/ijg8.lib;D:/Library/DCMTK/dcmtk/Build/lib/Debug/ijg8.lib;<br>
&gt;netapi32;wsock32;ITKDICOMParser;ITKEXPAT;ITKIOXML;ITKIOSpatialObjects;ITKF<br>
&gt;EM;itkopenjpeg;gdcmDICT;gdcmMSFF;ITKznz;ITKniftiio;ITKgiftiio;itkhdf5_cpp;<br>
&gt;itkhdf5;ITKIOBMP;ITKIOBioRad;ITKIOCSV;ITKIODCMTK;ITKIOGDCM;ITKIOIPL;ITKIOG<br>
&gt;E;ITKIOGIPL;ITKIOHDF5;itkjpeg;ITKIOJPEG;itktiff;ITKIOTIFF;ITKIOLSM;ITKIOMR<br>
&gt;C;ITKIOMesh;ITKIOMeta;ITKIONIFTI;ITKNrrdIO;ITKIONRRD;itkpng;ITKIOPNG;ITKIO<br>
&gt;Siemens;ITKIOStimulate;ITKIOTransformBase;ITKIOTransformHDF5;ITKIOTransfor<br>
&gt;mInsightLegacy;ITKIOTransformMatlab;ITKIOVTK;ITKKLMRegionGrowing;ITKVTK;IT<br>
&gt;KWatersheds;ITKReview;ITKVideoCore;ITKVideoIO;ITKVtkGlue<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;Thanks,<br>
&gt;<br>
&gt;Mengda<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;On Wed, Dec 11, 2013 at 11:12 PM, Mengda Wu<br>
&gt;&lt;<a href="mailto:wumengda@gmail.com">wumengda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;Hi all,<br>
&gt;<br>
&gt;<br>
&gt;   I found there is a recent update in the git version of<br>
&gt;Modules\ThirdParty\DCMTK\CMake\FindDCMTK.cmake. Although it fixes the<br>
&gt;issue of the one shipped with CMake install. This version still has a<br>
&gt;problem.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;   It cannot assign the correct DCMTK linking libraries accounding to<br>
&gt;build type. So for both debug and release build of my own application, in<br>
&gt;my cmake generated vc projects settings, I saw both the DCMTK debug and<br>
&gt;release libraries are in my Linker-&gt;Input-&gt;Additional<br>
&gt; Dependencies.<br>
&gt;<br>
&gt;<br>
&gt;  Why is that?<br>
&gt;<br>
&gt;<br>
&gt;Thanks,<br>
&gt;<br>
&gt;Mengda<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div>________________________________<br>
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.<br>

________________________________<br>
</blockquote></div><br></div></div></div>