简体   繁体   中英

g++ Difference Between Bash For Windows and Ubuntu

Simple question: Why is the version of g++ lower in the Bash For Windows subsystem than in Ubuntu proper?

Complicated question: Is there a way to fast forward the version of g++ on the Bash For Windows subsystem to what is pushed to normal Ubuntu systems?

Specifically, this question is stemming out of my need to use the c++17 filesystem implementation/support: With the same compile command ( g++ -Wall -std=c++1y main.cpp -o main ), the same file will not compile on Windows but will in Ubuntu:

#include <experimental/filesystem>

int main() {}

Any suggestions?

正如原始文章的评论所指出的那样,Linux For Windows子系统中的g ++由Windows维护, 此处不是最新版本。.因此,为Linux编译更新版本的gcc子系统,可以遵循指南(对我而言有效,只需要在编译命令的末尾添加-lstdc++fs即可正常运行)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM