<div dir="ltr">Adding the following entries in CMAKE fixes the problem:<div><br></div><div><p class="MsoNormal">_HAS_ITERATOR_DEBUGGING =0<span></span></p>
<p class="MsoNormal">_ITERATOR_DEBUG_LEVEL=0<span></span></p><p class="MsoNormal"><br></p><p class="MsoNormal">Sanjin P.</p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 15, 2017 at 11:28 PM, Sanjin Pajo <span dir="ltr"><<a href="mailto:sanjin.pajo@gmail.com" target="_blank">sanjin.pajo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am wondering if there is a workaround for this issue. I have been able to build other PCL dependencies (Boost, Eigen, Flann, QHull) in debug and release mode using Microsoft Visual Studio 2015 and PCL requires that VTK be built in both modes.<div> <div>This issue seems to be a known problem, here is a similar post in the PCL forum : <a href="http://www.pcl-users.org/LNK2038-error-when-trying-to-compile-PCL-debug-and-release-mixup-pcl-1-8-0-td4044738.html" target="_blank">http://www.pcl-users.org/<wbr>LNK2038-error-when-trying-to-<wbr>compile-PCL-debug-and-release-<wbr>mixup-pcl-1-8-0-td4044738.html</a> . </div><div><br></div><div>Sanjin P.</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 15, 2017 at 3:49 PM, Shawn Waldon <span dir="ltr"><<a href="mailto:shawn.waldon@kitware.com" target="_blank">shawn.waldon@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Sanjin,<br><br></div>This is a quirk of Windows. You cannot link libraries built in release mode with libraries built in debug mode. If you want a debug build, you need to build EVERYTHING in debug mode (and use debug versions of the dependencies you don't build yourself). Likewise, if you want to build in release mode, you have to build everything in release. It looks like you are trying to mix the two, which is something Microsoft doesn't allow. <br><br></div>HTH,<br></div>Shawn<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_5622559282790231184h5">On Tue, Aug 15, 2017 at 3:42 PM, Sanjin Pajo <span dir="ltr"><<a href="mailto:sanjin.pajo@gmail.com" target="_blank">sanjin.pajo@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_5622559282790231184h5"><div dir="ltr">I am installing Point Cloud Library (PCL 1.8.1) from source and it requires VTK. During the installation I get mismatch errors in Visual Studio 2015 when building in debug and release mode. I am using CMAKE to configure and generate build files.<div><br></div><div>Examples: </div><div><br><div><div>Error<span style="white-space:pre-wrap"> </span>LNK2038<span style="white-space:pre-wrap"> </span>mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in hdl_viewer_simple.obj<span style="white-space:pre-wrap"> </span>pcl_hdl_viewer_simple<span style="white-space:pre-wrap"> </span>C:\PCL\PCL-1.8.1\build\visuali<wbr>zation\tools\vtkRenderingConte<wbr>xtOpenGL2-7.1-gd.lib(vtkRender<wbr>ingContextOpenGL2ObjectFactory<wbr>.obj)<span style="white-space:pre-wrap"> </span>1<span style="white-space:pre-wrap"> </span></div><div><br></div><div><div><br></div><div>Error<span style="white-space:pre-wrap"> </span>LNK2038<span style="white-space:pre-wrap"> </span>mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in outofcore_viewer.obj<span style="white-space:pre-wrap"> </span>pcl_outofcore_viewer<span style="white-space:pre-wrap"> </span>C:\PCL\PCL-1.8.1\build\outofco<wbr>re\tools\vtkInteractionStyle-7<wbr>.1-gd.lib(vtkInteractionStyleO<wbr>bjectFactory.obj)<span style="white-space:pre-wrap"> </span>1<span style="white-space:pre-wrap"> </span></div></div><div><br></div><div>Any help is greatly appreciated.</div><div><br></div><div>Sanjin P.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><br></div><div> </div></div></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>