[vtkusers] Compile error building VTK 4.8.6

Gib Bogle g.bogle at auckland.ac.nz
Wed Mar 7 23:04:43 EST 2018


I am trying to build VTK for x64, something I've done before with MSVC 2010, but not with MSVC 2012.  I get this error compiling WTFString.cpp:


        cl -c -nologo -Zm200 -Zc:wchar_t- -wd4291 -wd4344 -wd4396 -wd4503 -wd480
0 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -DBUILDING_QT__=1
 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore -DBUIL
DING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE
 -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\Q
tCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" -I"as
sembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" -I"interpre
ter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" -I"d:\Q
t\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" -I"wtf\unicode" -
I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" -I"..\..\Source
" -I"..\..\include" -I"\include\QtWebKit" -I"\include" -I"..\..\..\..\..\include
\ActiveQt" -I"tmp\moc\release_shared" -I"..\..\..\..\..\mkspecs\win32-msvc2012"
-Fotmp\obj\release_shared\ @C:\Users\mbog002\AppData\Local\Temp\WTFString.obj.29
08.4805.jom
WTFString.cpp
.\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const std::pair<
_Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const std::pair<_Ty1,_Ty2> &'

...


(there are many more lines, but probably not adding more useful info).


The error seems to be from Hashset.h, about here:


    template<typename T, typename U, typename V>
    inline pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value)
    {
        return m_impl.add(value);
    }


I'm afraid this is way beyond my level  of C++ expertise - I don't use templates.  Is this error the result of a change between MSVC 2010 and 2012?  How can I avoid this error?


Thanks

Gib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180308/d5f28bdd/attachment.html>


More information about the vtkusers mailing list