Windows Eclipse C++ with MinGW
1. Install Mingw http://www.mingw.org/
http://sourceforge.net/projects/mingw/files/latest/download?source=files
2. In MinGW installation Manager
Select
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base
3. Add c:\mingw\bin to System enviornment Path
4. Download and install CDT http://www.eclipse.org/cdt/downloads.php
Eclipse -> Help -> Install New Software...
Add... //copy the relative URL
5. Configurate Eclipse
1. Windows -> Preferences -> C/C++ -> New CDT Project Wizard -> Makefile Project
Select PE Windows Parser
2. Windows -> Show view -> Make Target
6. Create C++ project
7. In the Make Target windows right click New...
8. Create Make target
9. Run As -> Local C/C++ Application
Troubleshooting
Compile Error:
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -ladvapi32
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lshell32
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -luser32
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lkernel32
In MinGW installation Manager
Install
1.mingw32-w32api
2.msys-w32api
This post is using Windows 8.1, Eclipse Indigo
http://sourceforge.net/projects/mingw/files/latest/download?source=files
2. In MinGW installation Manager
Select
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base
3. Add c:\mingw\bin to System enviornment Path
4. Download and install CDT http://www.eclipse.org/cdt/downloads.php
Eclipse -> Help -> Install New Software...
Add... //copy the relative URL
5. Configurate Eclipse
1. Windows -> Preferences -> C/C++ -> New CDT Project Wizard -> Makefile Project
Select PE Windows Parser
2. Windows -> Show view -> Make Target
6. Create C++ project
7. In the Make Target windows right click New...
8. Create Make target
9. Run As -> Local C/C++ Application
Troubleshooting
Compile Error:
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -ladvapi32
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lshell32
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -luser32
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lkernel32
In MinGW installation Manager
Install
1.mingw32-w32api
2.msys-w32api
This post is using Windows 8.1, Eclipse Indigo
留言
張貼留言