2016-07-05 61 views
0

我想编译鱿鱼鱿鱼-3.3.8。 面对一些错误如下。 如何解决这个问题?它与GCC版本有关吗?错误鱿鱼编译

In file included from Strand.cc:23:0: 
../../src/DiskIO/IpcIo/IpcIoFile.h:134:17: error: 'template<class> class std::auto_ptr' is deprecated [-Werror=deprecated-declarations] 
    static std::auto_ptr<Queue> queue; ///< IPC queue 

回答

0

std::auto_ptr自从C++ 11(如错误所述)已弃用。

通常情况下,编译器不会将其报告为错误,但作为警告,因此编译系统可能使用-Werror标志将警告转化为错误。

您有几种选择:

  1. 取出-Werror标志。

  2. 更改编译器选项以明确地将代码构建为C++ 03而不是更新的标准(-std=c++03)。

  3. 更改源代码并替换std::auto_ptrstd::unique_ptr(请确保您知道exactely他们修改代码时有什么不同)。

+0

谢谢。它为我工作。 –

+0

接受答案然后:)很高兴你得到它的工作。 –