如何下载编译器,如何下载编译器,以及如何将编译器添加到Qt?(ubuntu 12.04)

时间:2021-09-08 02:29:04

I've tried downloading the MinGW compiler from here: http://www.mingw.org/category/wiki/download . In that folder there was a file called "x86-mingw32-build.sh". I tried setting the path Build & Run -> Compiler to the path that that file is located in, but that didn't work. I also tried setting it to "/home/user/Qt/5.2.1/gcc_64/bin/qmake", which didn't work either. I'm at a total loss. If anyone who knows something about this could help me I'd really appreciate it.

我试过从这里下载MinGW编译器:http://www.mingw.org/category/wiki/download。在那个文件夹里有一个文件叫做“x86-mingw32-build.sh”。我尝试将path构建和运行->编译器设置为该文件所在的路径,但这不起作用。我也试着把它设置为“/home/user/Qt/5.2.1/gcc_64/bin/qmake”,但这两种方法都不起作用。我完全失败了。如果有人知道这件事,我会很感激的。

1 个解决方案

#1


2  

Right, so the issue is that you are trying to work with a cross-compiler for Windows, whereas - based on your comment -, it seems you simply want to build software on Linux for Linux, i.e. no cross compiling.

对,所以问题是你正在尝试使用一个针对Windows的交叉编译器,而基于你的评论,看起来你只是想在Linux上为Linux构建一个软件,也就是没有交叉编译。

In that case, you will need a compiler like gcc or llvm/clang. Both should be available from your repository and could install them as follow:

在这种情况下,您需要像gcc或llvm/clang这样的编译器。它们都应该从您的存储库中获得,并可以安装它们如下:

sudo apt-get install gcc

or

sudo apt-get install clang

#1


2  

Right, so the issue is that you are trying to work with a cross-compiler for Windows, whereas - based on your comment -, it seems you simply want to build software on Linux for Linux, i.e. no cross compiling.

对,所以问题是你正在尝试使用一个针对Windows的交叉编译器,而基于你的评论,看起来你只是想在Linux上为Linux构建一个软件,也就是没有交叉编译。

In that case, you will need a compiler like gcc or llvm/clang. Both should be available from your repository and could install them as follow:

在这种情况下,您需要像gcc或llvm/clang这样的编译器。它们都应该从您的存储库中获得,并可以安装它们如下:

sudo apt-get install gcc

or

sudo apt-get install clang