【问题标题】:compile opengl red book 9 example编译opengl红皮书9示例
【发布时间】:2017-05-20 13:07:25
【问题描述】:

我从 github 上拿了红皮书的例子。 在 debian jessie 下,我运行 cmake,一切正常。 当我运行 make 我得到这个错误:

In file included from /usr/include/c++/4.9/cstdint:35:0,
             from /home/antonio/Documenti/CG/OGLPG-9th-    Edition/lib/vdds.cpp:16:
/usr/include/c++/4.9/bits/c++0x_warning.h:32:2: error: #error This file                          requires compiler and library support for the ISO C++ 2011 standard. This    support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

。 . .

【问题讨论】:

    标签: opengl makefile compiler-errors g++


    【解决方案1】:

    在 CmakeLists.txt 文件中添加这一行:

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=gnu++0x")
    

    【讨论】:

    • 至少对于 Linux 应该是 CMakeLists.txt(区分大小写)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-05
    • 2015-08-22
    • 1970-01-01
    相关资源
    最近更新 更多