[vtkusers] VTK Error

Sanjin Pajo sanjin.pajo at gmail.com
Sun Aug 20 13:05:00 EDT 2017


Adding the following entries in CMAKE fixes the problem:

_HAS_ITERATOR_DEBUGGING =0

_ITERATOR_DEBUG_LEVEL=0


Sanjin P.

On Tue, Aug 15, 2017 at 11:28 PM, Sanjin Pajo <sanjin.pajo at gmail.com> wrote:

> 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.
>
> This issue seems to be a known problem, here is a similar post in the PCL
> forum : http://www.pcl-users.org/LNK2038-error-when-trying-to-
> compile-PCL-debug-and-release-mixup-pcl-1-8-0-td4044738.html .
>
> Sanjin P.
>
> On Tue, Aug 15, 2017 at 3:49 PM, Shawn Waldon <shawn.waldon at kitware.com>
> wrote:
>
>> Hi Sanjin,
>>
>> 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.
>>
>> HTH,
>> Shawn
>>
>> On Tue, Aug 15, 2017 at 3:42 PM, Sanjin Pajo <sanjin.pajo at gmail.com>
>> wrote:
>>
>>> 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.
>>>
>>> Examples:
>>>
>>> Error LNK2038 mismatch detected for 'RuntimeLibrary': value
>>> 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in
>>> hdl_viewer_simple.obj pcl_hdl_viewer_simple
>>> C:\PCL\PCL-1.8.1\build\visualization\tools\vtkRenderingConte
>>> xtOpenGL2-7.1-gd.lib(vtkRenderingContextOpenGL2ObjectFactory.obj) 1
>>>
>>>
>>> Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2'
>>> doesn't match value '0' in outofcore_viewer.obj pcl_outofcore_viewer
>>> C:\PCL\PCL-1.8.1\build\outofcore\tools\vtkInteractionStyle-7
>>> .1-gd.lib(vtkInteractionStyleObjectFactory.obj) 1
>>>
>>> Any help is greatly appreciated.
>>>
>>> Sanjin P.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170820/e909ade5/attachment.html>


More information about the vtkusers mailing list