简体   繁体   English

使用Eclipse检查GCC版本

[英]Check GCC version using Eclipse

I try to get my gcc version using below code. 我尝试使用以下代码获取我的gcc版本。 when I build and run it , console show "Nothing to build fro (my project name) ". 当我构建并运行它时,控制台显示“没有来回构建(我的项目名称)”。

#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main( int argc, char ** argv ) {
stringstream version;
version << "GCC version: "
        << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__
        << "\nVersion string: " << __VERSION__;
cout << version.str() << endl;
return 0;
}

I found the solution. 我找到了解决方案。 I didn't set path variable to MinGW. 我没有将路径变量设置为MinGW。 I it working properly. 我它工作正常。 Thank you all. 谢谢你们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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