我正在尝试将TR1用于某些C++项目.不幸的是我收到错误,不明白为什么或如何正确地做到这一点!我在Linux下用gcc 4.4.5工作.
我收到了错误
myfile.cpp:21:35: error: tr1/normal_distribution: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我需要的TR1文件是通过以下方式导入的:
#include <tr1/normal_distribution>
Run Code Online (Sandbox Code Playgroud)
在CMakeLists.txt中我打开TR1支持(-std = c ++ 0x)
SET (CMAKE_CXX_FLAGS "-Wall -std=c++0x -DNDEBUG -O3 -march=nocona -msse4.2")
Run Code Online (Sandbox Code Playgroud)
知道我做错了什么吗?