问一个g++的编译错误?
我编译时遇到了如下的错误提示:
In file included from /usr/include/c++/4.4/cstdint:35,
from iod_init.h:13:
/usr/include/c++/4.4/c++0x_warning.h:31:2: error:
#error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
因为我在源代码中使用了int64_t类型。
查看了一下头问发现:
** @file include/c++0x_warning.h * This is a Standard C++ Library header. */#ifndef _CXX0X_WARNING_H#define _CXX0X_WARNING_H 1#ifndef __GXX_EXPERIMENTAL_CXX0X__#error This file requires compiler and library support for the upcoming \ISO C++ standard, C++0x. This support is currently experimental, and must be \enabled with the -std=c++0x or -std=gnu++0x compiler options.#endif#endif
#define __GXX_EXPERIMENTAL_CXX0X__#include <cstddef>#include <cstdio>#include <cstdlib>#include <cstdint>