我下载并安装了MinGW在C:\MinGw下,安装了g++和gcc。
如果我运行g++ --version,就会得到:
g++.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
如
在Mingw-w64中,CMake找不到我在命令行中指定的非默认编译器。
这是构建前的输出:
MINGW64 /C/projects/TEST
$ cmake -G "MSYS Makefiles" -D CMAKE_C_COMPILER=/mingw64/bin/gcc -D CMAKE_CXX_COMPILER=/mingw64/bin/g++ ../Test-LineHandler
Sub-project name: Test
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identi
我试图在windows 7(版本6.1.7601)上安装boost v.1.54。已经安装了包含mingw、gcc和g++编译器的cygwin。
我需要使用'stage‘参数来构建boost;但是它会产生以下错误:
C:\boost\tools\build\v2>b2 --prefix="C:\boost_build" toolset=gcc --build type=complete gcc stage
notice: could not find main target stage
notice: assuming it is a name of file
我试着运行一个简单的Hello world程序。当我尝试构建它时,我得到了这个错误。它意味着什么?我如何解决它?我使用的是Windows7,%PATH%中有MinGW和MSys。
**** Build of configuration Debug for project learn ****
**** Internal Builder is used for build ****
g++ -IC:\MinGW\lib\gcc\mingw32\4.5.2\include\c++ -IC:\MinGW\libexec\gcc\mingw32\4.5.2 -O0 -g3
我正试图在Windows 10机器上编译用明-W64编写的Google测试,但我总是会发现错误:
C:\git\tdd\googletest>cmake CMakeLists.txt -G "MinGW Makefiles"
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build
我在windows XP SP3上运行MinGW。我用C++编写了一个简单的程序,并将其保存为.cpp文件。当我试图在MinGW中将其编译到正确的目录时,出现一条消息说“错误:不存在这样的文件或目录”,但我知道它在正确的目录中。
这是我在MinGW中输入的内容
cd C:\MinGW test # Where I saved the .cpp file
g++ test.cpp -o test.exe
在此之后,出现一个错误。
此外,我还将环境设置路径更改为C:\MinGW\bin
我正在试验元组,在创建元组时遇到了一个问题。代码示例如下所示。
//a.cpp
#include <tuple>
using namespace std;
int main() {
auto te = make_tuple(); //this line is ok
auto tte = make_tuple(te); //this line gives an error.
return 0;
}
我用g++ 4.5 (g++ -std=c++0x a.cpp)和MS VC++2010编译了它。两个编译器都在main()的第二行给了我一个错误。
我的问题是:既然&
我将CEDET配置为自动完成MinGW的gcc,它工作得很好,但是我不能得到g++的工作,以完成STL库的成员。例如,我无法自动完成std::string变量以获取c_str()或其他函数:
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
string s;
s. // no pop up member functions here
return 0;
}
下面是我的.emacs的配置部分:
;;
我按照一些教程安装了MinGW和CDT。我正在尝试编译和运行"hello world“代码。eclipse中没有错误,但是当我编译代码时,我得到了这个错误:
22:48:32 **** Incremental Build of configuration Debug for project test3 ****
Info: Internal Builder is used for build
g++ "-IC:\\MinGW\\lib\\gcc\\mingw32\\4.8.1\\include\\c++" "-IC:\\MinGW\\lib\\gcc\\ming