我想在CentOS 7上使用带有clang/clang ++的C++ 11或C++ 14.如何构建这个构建环境?
Window Store应用程序与经典Windows应用程序不同.后者通常安装在C:\ Program Files下的清晰路径上.因此,AutoHotKey(AHK)脚本可以通过"运行"使用应用程序可执行文件的路径来运行经典应用程序.但是,似乎没有简单的Windows Store应用程序可执行文件路径.那么,如何使用简单的方法在AutoHotKey脚本中启动Windows应用商店应用呢?
这是我的环境:
CentOS 64位7.2.1511
Anaconda 3 4.1.1 64位(Python 3.5.2)
我想通过创建venv虚拟环境pyvenv.不幸的是,我收到此错误消息:
$ pyvenv test
Error: Command '['/root/test/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1
在搜索互联网后,人们说模块ensurepip丢失了.我检查了我的Anaconda安装路径/opt/anaconda3/lib/python3.5.没有ensurepip文件夹.
然后,在我的Windows 10 64位上,我检查了我的Anaconda安装路径D:\win10\Anaconda3\Lib\.有一个ensurepip文件夹!我可以成功python -m venv test地创建一个venv.
然后,我检查了下载Anaconda python档案:
D:\win10\Anaconda3\pkgs\python-3.5.2-0.tar.bz2在Windows 10和
/opt/anaconda3/pkgs/python-3.5.2-0.tar.bz2CentOS 7上.
Windows 10上的一个存档有一个ensurepip子文件夹.但是CentOS 7上没有!
有谁知道这个区别?这是Anaconda的错误吗?
我写了一个简单的C++程序t.cpp:
// t.cpp
#include <vector>
#include <string>
using namespace std;
int main() {
vector<string> strVec;
string a("a");
strVec.push_back(a);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
然后,我在CentOS 6.5 x64上用clang ++ 3.4编译它.可以通过此命令编译它而不会出现任何错误:
clang++ t.cpp
Run Code Online (Sandbox Code Playgroud)
但是,如果我打开C++ 11标志,-std = c ++ 11:
clang++ -std=c++11 t.cpp
Run Code Online (Sandbox Code Playgroud)
我收到了很多错误消息:
In file included from t.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/vector:61:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:66:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:60:
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:57:14: error: rvalue reference to type 'basic_string<[3 * ...]>' cannot bind to lvalue of type
'basic_string<[3 * ...]>'
{ return __t; } …Run Code Online (Sandbox Code Playgroud) c++ ×2
c++11 ×2
clang ×2
anaconda ×1
autohotkey ×1
centos ×1
libc++ ×1
python ×1
python-venv ×1
windows-10 ×1