Menu

Windows SDK 7.1, MSVC 2010 Build Error

Help
Shakes
2011-03-20
2013-04-06
  • Shakes

    Shakes - 2011-03-20

    Hi Guys,

    I get the following when building under windows vista x64, SDK 7.1, msvc 2010 (Compiler Version 16.00.30319.01 for x64), Qt 4.7.2 and PythonQt 2.0.1

           

    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -MP -W3 -w34100 -w34
    189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -D_CRT_SECURE_NO_WARNINGS -DRXX_ALL
    OCATOR_INIT_0 -DQT_DLL -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -D
    QT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT
    -I"..\..\Qt-4.7.2\include\QtCore" -I"..\..\Qt-4.7.2\include\QtXml" -I"..\..\Qt-4
    .7.2\include" -I"." -I"." -I"f:\Libs\Qt\PythonQt2.0.1\generator\..\common" -I"pa
    rser" -I"parser\rpp" -I"parser\rpp" -I"..\..\Qt-4.7.2\include\ActiveQt" -I"relea
    se" -I"..\..\Qt-4.7.2\mkspecs\win32-msvc2008" -Forelease\ @C:\Users\shakes\AppDa
    ta\Local\Temp\nm6E06.tmp
    main.cpp
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(275) : e
    rror C2679: binary '=' : no operator found which takes a right-hand operand of t
    ype 'rpp::pp_output_iterator<_Container>' (or there is no acceptable conversion)
            with
            [
                _Container=std::string
            ]
            f:\libs\qt\pythonqt2.0.1\generator\parser\rpp\pp-iterator.h(74): could b
    e 'rpp::pp_output_iterator<_Container> &rpp::pp_output_iterator<_Container>::ope
    rator =(const char &)'
            with
            [
                _Container=std::string
            ]
            while trying to match the argument list '(rpp::pp_output_iterator<_Conta
    iner>, rpp::pp_output_iterator<_Container>)'
            with
            [
                _Container=std::string
            ]
            C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(
    2176) : see reference to function template instantiation '_Iter &std::_Rechecked
    <_OutIt,_OutIt>(_Iter &,_UIter)' being compiled
            with
            [
                _Iter=rpp::pp_output_iterator<std::string>,
                _OutIt=rpp::pp_output_iterator<std::string>,
                _UIter=rpp::pp_output_iterator<std::string>
            ]
            f:\libs\qt\pythonqt2.0.1\generator\parser\rpp\pp-internal.h(83) : see re
    ference to function template instantiation '_OutIt std::copy<std::_String_iterat
    or<_Elem,_Traits,_Alloc>,_OutputIterator>(_InIt,_InIt,_OutIt)' being compiled
            with
            [
                _OutIt=rpp::pp_output_iterator<std::string>,
                _Elem=char,
                _Traits=std::char_traits<char>,
                _Alloc=std::allocator<char>,
                _OutputIterator=rpp::pp_output_iterator<std::string>,
                _InIt=std::_String_iterator<char,std::char_traits<char>,std::allocat
    or<char>>
            ]
            f:\libs\qt\pythonqt2.0.1\generator\parser\rpp\pp-engine-bits.h(502) : se
    e reference to function template instantiation 'void rpp::_PP_internal::output_l
    ine<_OutputIterator>(const std::string &,int,_OutputIterator)' being compiled
            with
            [
                _OutputIterator=rpp::pp_output_iterator<std::string>
            ]
            f:\libs\qt\pythonqt2.0.1\generator\parser\rpp\pp-engine-bits.h(116) : se
    e reference to function template instantiation 'void rpp::pp::operator ()<const
    _Elem*,_OutputIterator>(_InputIterator,_InputIterator,_OutputIterator)' being co
    mpiled
            with
            [
                _Elem=char,
                _OutputIterator=rpp::pp_output_iterator<std::string>,
                _InputIterator=const char *
            ]
            f:\libs\qt\pythonqt2.0.1\generator\parser\rpp\pp-engine-bits.h(84) : see
     reference to function template instantiation 'void rpp::pp::file<rpp::pp_output
    _iterator<_Container>>(FILE *,_OutputIterator)' being compiled
            with
            [
                _Container=std::string,
                _OutputIterator=rpp::pp_output_iterator<std::string>
            ]
            f:\libs\qt\pythonqt2.0.1\generator\main.h(130) : see reference to functi
    on template instantiation 'void rpp::pp::file<rpp::pp_output_iterator<_Container
    >>(const std::string &,_OutputIterator)' being compiled
            with
            [
                _Container=std::string,
                _OutputIterator=rpp::pp_output_iterator<std::string>
            ]
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(275) : e
    rror C2582: 'operator =' function is unavailable in 'rpp::pp_output_iterator<_Co
    ntainer>'
            with
            [
                _Container=std::string
            ]
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\Bin\amd64\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\Bin\amd64\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    

    Seems like a simple const char string and std::string confusion for the compiler but I just can't pick up where, Any help would be appreciated.

    Cheers
    Shakes

     
  • Julian Wiegel

    Julian Wiegel - 2011-06-08

    Hi Shakes!

    Had this problem too. It seems that the assignment was changed in SKD 7.1. Fix it by replacing the appropriated line in pp-iterator.h.

    inline pp_output_iterator &operator=(pp_output_iterator &__v) {

    const size_t need = _M_result.size() + __v._M_result.size();

    if (_M_result.capacity() < need)
    _M_result.reserve(need);

    _M_result.append(__v._M_result);

    // _M_result = __v._M_result;

    return *this;

    }

    Greeting,

    Julian Wiegel

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.