错误C2061:语法错误:标识符'缓冲区'在编译algparam.h时

时间:2018-05-05 18:46:00

标签: c++ boost compilation crypto++ mysqlconnection

我在使用Crypto ++编译游戏时遇到与Crypto++ giving a compiler error in algparam.h相同的错误。错误是:

Error C2061: syntax error : identifier 'buffer' (at line 397)

这是代码。它从第390行开始,在第411行结束。

#if defined(DEBUG_NEW) && (_MSC_VER >= 1300)
# pragma push_macro("new")
# undef new
#endif

    void MoveInto(void *buffer) const
    {
        AlgorithmParametersTemplate<T>* p = new(buffer) AlgorithmParametersTemplate<T>(*this);
        CRYPTOPP_UNUSED(p); // silence warning
    }

#if defined(DEBUG_NEW) && (_MSC_VER >= 1300)
# pragma pop_macro("new")
#endif

protected:
    T m_value;
};

CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<bool>;
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<int>;
CRYPTOPP_DLL_TEMPLATE_CLASS AlgorithmParametersTemplate<ConstByteArrayParameter>;

问题是什么,我该如何解决?

以下是我使用的库:

  • 提升1.67(尝试过1.63)
  • sqlapi ++
  • mysqlcppconns

以下是错误消息:

1>c:\local\cryptopp\algparam.h(397): error C2061: syntax error: identifier 'buffer'
1>c:\local\cryptopp\algparam.h(396): note: while compiling class template member function 'void CryptoPP::AlgorithmParametersTemplate<CryptoPP::ConstByteArrayParameter>::MoveInto(void *) const'
1>c:\local\cryptopp\algparam.h(411): note: see reference to class template instantiation 'CryptoPP::AlgorithmParametersTemplate<CryptoPP::ConstByteArrayParameter>' being compiled

0 个答案:

没有答案