Eclipse и MinGW
Как правильно подключить MinGW к Eclipse (v.3.4)? Поставил eclipse себе впервые и он отказывается собирать (нету make), что вполне логично. Стал ставить MinGW (скачал с сайта 5.1.4). Он при установке выдает ошибку: gzread: incomplete block read, error: failure reading from tarball. От чего такая ошибка? Есть MinGW от комплекта Code:Blocks. Возможно ли его подключить? И вообще, возможно ли подключить MinGW через eclipse (Software Update)?
Можно помочь и линками на статьи.
#1
13:50, 18 авг 2008
удалось настроить, но пока не понятно где прописать папку, в которую ведется билд, чтобы билдил не в ./Debug или ./Release, а, например, в ./bin
#2
13:54, 18 авг 2008
А не проще скачать Eclipse C/C++ Development Tooling — CDT ? Java и C/C++ в комплекте.
А куда складывать билд изменяется в свойствах проекта помоему (тык по названию проекта, а затем Alt+Enter).
#3
13:59, 18 авг 2008
evirus
личный опыт.
Скачал опен соурц QT на тра****я я знатно.Получилось как говориться «с бубном».
Плюнул нашел в торенте комерческий QT. и попробовал работать QT+VS2008 бубна не хватило.
Еще раз плюнул поставл себе VS2005+SP1 и поставил QT комерч. Все отлично заработало, кроме разве.
QDisigner использую а не встроенную в студию аналог(кривоват).
Лучше сделай сразу комерч. (если ты не на линухе хочеш програмить QT)
#4
14:25, 18 авг 2008
>Скачал опен соурц QT на тра****я я знатно.Получилось как говориться «с бубном».
Никакого бубна не нужно, всё отлично компилируется, весь секрет в том, что нужно прописать системные переменные QTDIR, PATH, Lib, Include к студии и bin директории с дистрибутивом Qt. Правда, полноценное использование вместе с QDesigner возможно лишь с QMake или (если нужен Visual Studio) c помощью генерации файлов vcproj c помощью CMake. Дополнительный плюс — CMake позволяет генерировать и makefile для unix и mingw. Интегратор тоже не нужен, — ибо недоделанная поделка.
configure.bat
set QTDIR=c:\qt4 set QMAKESPEC=win32-msvc2008 set PATH=c:\qt4\bin;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin set LIB=c:\qt4\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib set INCLUDE=c:\qt4\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include configure.exe -debug-and-release -qt-zlib -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -webkit -no-qt3support -no-dbus -no-phonon -arch windows
set QTDIR=c:\qt4 set QMAKESPEC=win32-msvc2008 set PATH=c:\qt4\bin;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin set LIB=c:\qt4\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib set INCLUDE=c:\qt4\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include nmake
Запускаем configure.bat, потом make.bat — и вуаля без всякого бубна.
Что касается использования вместе с Visual Studio, то устанавливаем CMake и гуглим туториалы по Qt4, там нет ничего сложного. А использовать QDevelop нужно, проассоциировав ui файлы, как внешнюю тулзу.
#5
15:02, 18 авг 2008
API
это оно и есть, вот только Build location нельзя поменять, если включен auto make gen, иначе надо руками его писать. Вот поменять бы шаблон.ю по которому он генерится.
#6
8:27, 19 авг 2008
еще проблема:
Есть Build selected files, но на него в Keys его нету, а hotkey на него надо бы.
Как-нибудь решается?
Setting up MinGW-w64
Since the original mingGW installer from underneath is not always working this is the best possibility to install the latest version of MingGW-64. Download the latest MSYS2 Installer and follow the steps in the wizard. After installing MSYS2, open the «MSYS2 MINGW64» terminal and download the Mingw-w64 toolchain with help of the package manager:
pacman -S —needed base-devel mingw-w64-x86_64-toolchain
Install MinGW-w64
MinGW-w64 comprises development tools for compiling and debugging. Download the Mingw-w64 Installer from here and follow the steps in the wizard. It is essential that the installation path does not contain any spaces. Therefore, you cannot install MinGW-w64 in Program Files. We recommend to create a folder mingw-w64 on your system drive (e.g., C:\mingw). Install a current version and specify win32 as thread when requested. Additionally, choose the architecture x86_64 .
Set PATH variable
After installing, you need to edit the PATH variable. You can access the System Control Center by pressing Windows Key + Pause . In the System window, click Advanced System Settings → Advanced (tab) → Environment Variables . For Windows 10, a quick access is to enter «Edit the system environment variables» in the Start Search of Windows and click the button «Environment Variables». Change the PATH variable (double-click on it or Select and Edit ), and add the path where your MinGW-w64 has been installed to e.g., C:\mingw\mingw64\bin or C:\msys64\mingw64\bin . This folder should contain a number of .exe-files that you can see in your Explorer.
Test MinGW-w64
Open the command prompt of Windows either via the Program Menu or type cmd in the Start Search of Windows. Enter:
If version information of the compiler is displayed, it was successful and you can continue with the next section.
If you get an error such as «Command g++ not found», then something went wrong. In this case, verify that the PATH variable was successfully set and directs to the correct installation path. Additionally, open a new command prompt and try to execute the command again. If you try to reinstall, do not forget to restart the command prompt again (it does not update automatically). If this does not help, please ask for advice in the Forum.
Change name of the make executable
In your installation folder, inside the bin directory, you should find a file called mingw32-make.exe . Create a copy of the file in the same directory named make.exe . This is because this file is the one you will use to compile 4diac FORTE, and «make» is the command used for that throughout the documentation.
Next steps
- When generating files for compiling in CMake, the tool «Unix Makefiles» has to be selected.
- Also the architecture option needs to be set in CMake: The correct FORTE_ARCHITECTURE is Win32
- When compiling, open the Windows command line and go to the folder, where CMake built the binaries. Execute the command make to compile.
Where to go from here?
If you want to build a 4diac FORTE, here is a quick link back:
If you want to go back to the Start Here page, we leave you here a fast access
Установка и настройка Eclipse + MinGW

Установил MinGW и Eclips for C++ не удается запустить тестовый пример Hello world.
Ошибка
sh -c «autoreconf -i» Cannot run program «sh»: Launching failed
Как правильно и где прописывать все необходимые пути?
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
Ответы с готовыми решениями:
Eclipse + MinGW — не компилируют
Здравствуйте. Пытаюсь тут с NetBeans + MinGW переползти на Eclipse + MinGW. При попытке.
подключение *.lib используя mingw + eclipse
Здравствуйте. Есть библиотека *.lib. Подскажите, как подключить ее к проекту в eclipse? В инете.
Установка Eclipse C/C++ и MinGW
Установил вышеуказанные программы и на одном из сайтов было указанно, что для проверки правильности.
установка MinGW и Eclipse
Здравствуйте! Хочу установить себе MinGW и Eclipse, сижу битый час и ни чего не получается.
How to compile and run C++ with MinGW using Eclipse and CDT?
I would like to do some C++ development on Windows using Eclipse and the CDT plugin. I use Eclipse Helios SR1 and have installed the CDT plugin. I have also installed MinGW and now I wrote a simple «Hello World» in Eclipse. hello.cpp
#include using namespace std; int main()
In Eclipse using the CDT plugin and the MinGW compiler. How can I compile my program? And how can I test run the program from within Eclipse?
asked Oct 20, 2010 at 14:26
125k 97 97 gold badges 317 317 silver badges 399 399 bronze badges
Here is another good resource for installing MinGW on Eclipse: chrismwright.wordpress.com/2012/10/13/… Pretty much a step-by-step installation including Hello World example at the end.
Jan 7, 2013 at 16:44
4 Answers 4
125k 97 97 gold badges 317 317 silver badges 399 399 bronze badges
answered Oct 20, 2010 at 14:46
14.2k 5 5 gold badges 44 44 silver badges 71 71 bronze badges
Thanks, I hadn’t set the environment variables for MinGW and MSYS.
Oct 20, 2010 at 16:41
After browsing many threads and articles I’ve found a solution. Solution tested on Windows 10 x64 on Eclipse Neon.3 Release (4.6.3) with C/C++ Development Tools 9.2.1.201704050430 and MinGW
System configuration
- Download MinGW. Any distro might work. I used the distro recommended on http://isocpp.org/
- Extract archive into C:\MinGW (actually to C:\ , because archive contains folder MinGW )
- RMB on This PC -> Properties -> Additional system settings -> Tab Advanced -> Button Environment variables
- On second table System variables click New . Name variable MINGW_HOME and set path to MinGW install folder C:\MinGW and then OK
- Find variable Path in table and choose Edit
- In new window click New and type %MINGW_HOME%\bin\
- Confirm actions by clickig OK in opened windows
- You can check availability of new tools by typing in command line g++ —version You should see something like
g++ (GCC) 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.
Eclipse CDT configuration
- Install Eclipse with CDT or just add CDT to existing Eclipse installation
- Go to the folder with installed MinGW ( C:\MinGW\bin\ ). Make a copy of file gcc.exe (DO NOT RENAME original file!)
- Rename copied filed to mingw32-gcc.exe (You should have both files gcc.exe and mingw32-gcc.exe in \MinGW\bin\ )
- Open Eclipse and select C\C++ perspective
- Go to Window -> Preferences -> C\C++ -> Build -> Environment
- Click Add and type PATH as name and click on Variables and select Path . Confirm with Ok .
- Select new variable PATH by clicking Select and then Ok .
- Restart Eclipse
Now you should be able to compile Hello World program. Just select New -> C++ Project . Here you should see available MinGW as Toolchain