NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

C/C++; setting up MinGW and MSYS

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
zorphon



Joined: 07 Apr 2011
Posts: 10

PostPosted: Thu Apr 07, 2011 11:12 pm    Post subject: C/C++; setting up MinGW and MSYS Reply with quote

Posted this in the general NetBeans Users forum but I saw this and thought it would be more appropriate here, so here goes:

I clearly set them up wrong, because I get this when I try to build the Welcome_1 sample project within NetBeans:
Code:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/bl/Documents/NetBeansProjects/Welcome_1'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/welcome_1.exe
make[2]: Entering directory `/c/Users/bl/Documents/NetBeansProjects/Welcome_1'
make[2]: mkdir: Command not found
make[2]: *** [build/Debug/MinGW-Windows/welcome.o] Error 127
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
mkdir -p build/Debug/MinGW-Windows
make[2]: Leaving directory `/c/Users/bl/Documents/NetBeansProjects/Welcome_1'
make[1]: Leaving directory `/c/Users/bl/Documents/NetBeansProjects/Welcome_1'

BUILD FAILED (exit value 2, total time: 1s)


What does this mean, and how do I fix it?
Back to top
gaich



Joined: 12 Feb 2011
Posts: 7

PostPosted: Sat Apr 09, 2011 12:53 pm    Post subject: Reply with quote

MinGW has a subdirectory msys\1.0\bin with unix-fashion tools. Add this path to your PATH variable and mkdir should be found.
Back to top
zorphon



Joined: 07 Apr 2011
Posts: 10

PostPosted: Sun Apr 10, 2011 7:53 pm    Post subject: Reply with quote

gaich wrote:
MinGW has a subdirectory msys\1.0\bin with unix-fashion tools. Add this path to your PATH variable and mkdir should be found.


I had that in my PATH environmental variable. The only way it works though is when I remove all dependencies, so it doesn't depend on any .dll's anymore. Will this hurt me in the future?
Back to top
gaich



Joined: 12 Feb 2011
Posts: 7

PostPosted: Mon Apr 11, 2011 12:33 pm    Post subject: Reply with quote

What are the dependencies you have to remove ?
Back to top
Rommeliser



Joined: 18 Sep 2011
Posts: 1

PostPosted: Sun Sep 18, 2011 9:36 pm    Post subject: Set Path in windows 7 - Had same problem Reply with quote

Had the same problem, couldn't find the mkdir command on build. Solution is to set the PATH variable. Right click on MY COMPUTER,Click Properties,Highlight the PATH variable in the lower box,press edit,arrow to the end of the line and insert a semicolon then add H:\MinGW\msys\1.0\bin\ . For some reason it did not work on my machine until I added the final " \ " . Now it works. I think my problem was also related to using a quad boot system, booting windows 7 from the H drive. PS dont delete any info from the PATH variable, otherwise other programs may not work !(Press cancel if you do accidentally). Laughing
Back to top
lisaab



Joined: 30 Oct 2015
Posts: 0

PostPosted: Thu Oct 29, 2015 10:45 pm    Post subject: Reply with quote

192.168.1.1
Awesome guide! Thanks for sharing with us!
Back to top
mich_nbf



Joined: 11 Nov 2015
Posts: 1

PostPosted: Wed Nov 11, 2015 1:12 am    Post subject: Reply with quote

I've recently had several attempts to use MinGW with Netbeans. I have been using the Cygwin gcc sceheme for several years.

With MinGW, I get stuck here

Code:
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make.exe[1]: Entering directory `/c/Proj/NB/Welcome_MinGW'
rm -f -r build/Debug
      0 [main] rm 3752 open_stackdumpfile: Dumping stack trace to rm.exe.stackdump
make.exe[1]: Leaving directory `/c/Proj/NB/Welcome_MinGW'
make.exe[1]: *** [.clean-conf] Error 255
make.exe": *** [.clean-impl] Error 2

CLEAN FAILED (exit value 2, total time: 1m 50s)


People seem to have had issues with not being able to find mkdir, which I suspect is somehow related to this.

To use MinGW, do I have to remove Cygwin ? Can I use both, for different projects ? I'd seen the warning to keep the toolchains separate, they are both installed and the "toolchain validation" seems to take about 15 minutes but never complains.

There seems to be conflicting suggestions about using C;\Msys\bin or C:\MinGW\msys\1.0\bin . Which is correct ?
Back to top
Mark Wilmoth
Posted via mailing list.





PostPosted: Sat Nov 14, 2015 10:20 pm    Post subject: C/C++; setting up MinGW and MSYS Reply with quote

I believe your system path is mixed up. Make sure you system path only has one path to make.exe, rm.exe, etc. You should only have one path to a gcc toolchain. If you have /C/MinGW/msys/1.0/bin/ you do not need /C/Msys/bin because it should be exactly the same thing.




Mark

From: mich_nbf <address-removed>
To: address-removed
Sent: Tuesday, November 10, 2015 7:12 PM
Subject: C/C++; setting up MinGW and MSYS


I've recently had several attempts to use MinGW with Netbeans. I have been using the Cygwin gcc sceheme for several years.

With MinGW, I get stuck here


Code:
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make.exe[1]: Entering directory `/c/Proj/NB/Welcome_MinGW'
rm -f -r build/Debug
0 [main] rm 3752 open_stackdumpfile: Dumping stack trace to rm.exe.stackdump
make.exe[1]: Leaving directory `/c/Proj/NB/Welcome_MinGW'
make.exe[1]: *** [.clean-conf] Error 255
make.exe": *** [.clean-impl] Error 2

CLEAN FAILED (exit value 2, total time: 1m 50s)



People seem to have had issues with not being able to find mkdir, which I suspect is somehow related to this.

To use MinGW, do I have to remove Cygwin ? Can I use both, for different projects ? I'd seen the warning to keep the toolchains separate, they are both installed and the "toolchain validation" seems to take about 15 minutes but never complains.

There seems to be conflicting suggestions about using C;\Msys\bin or C:\MinGW\msys\1.0\bin . Which is correct ?
Back to top
Mark Wilmoth
Posted via mailing list.





PostPosted: Sat Nov 14, 2015 10:38 pm    Post subject: C/C++; setting up MinGW and MSYS Reply with quote

Also, you only need Cygwin for the netbeans terminal to work. But you don't need it, you can use external terminal or standard output. I stopped using Cygwin because it is difficult to install.

If you want something really slick that is updated frequently, install a 32-bit or 64-bit version of MSYS2 from here: https://msys2.github.io/

After installation, run "pacman -S make" to install GNU Make and "pacman S mingw-w64-x86_64-toochain" for 64-bit and "pacman -S mingw-w64-i686-toolchain" for 32-bit MinGW toolchains.


Mark

From: Mark Wilmoth <address-removed>
To: "address-removed" <address-removed>
Sent: Saturday, November 14, 2015 4:19 PM
Subject: Re: C/C++; setting up MinGW and MSYS


I believe your system path is mixed up. Make sure you system path only has one path to make.exe, rm.exe, etc. You should only have one path to a gcc toolchain. If you have /C/MinGW/msys/1.0/bin/ you do not need /C/Msys/bin because it should be exactly the same thing.


Mark



From: mich_nbf <address-removed> To: address-removed Sent: Tuesday, November 10, 2015 7:12 PM Subject: C/C++; setting up MinGW and MSYS
I've recently had several attempts to use MinGW with Netbeans. I have been using the Cygwin gcc sceheme for several years.With MinGW, I get stuck hereCode:"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-confmake.exe[1]: Entering directory `/c/Proj/NB/Welcome_MinGW'rm -f -r build/Debug 0 [main] rm 3752 open_stackdumpfile: Dumping stack trace to rm.exe.stackdumpmake.exe[1]: Leaving directory `/c/Proj/NB/Welcome_MinGW'make.exe[1]: *** [.clean-conf] Error 255make.exe": *** [.clean-impl] Error 2CLEAN FAILED (exit value 2, total time: 1m 50s)People seem to have had issues with not being able to find mkdir, which I suspect is somehow related to this.To use MinGW, do I have to remove Cygwin ? Can I use both, for different projects ? I'd seen the warning to keep the toolchains separate, they are both installed and the "toolchain validation" seems to take about 15 minutes but never complains.There seems to be conflicting suggestions about using C;\Msys\bin or C:\MinGW\msys\1.0\bin . Which is correct ?
Back to top
pabristow



Joined: 31 Aug 2012
Posts: 15
Location: UK

PostPosted: Thu Mar 03, 2016 5:21 pm    Post subject: Reply with quote

I have a similar but different failure in the netup using

https://msys2.github.io/
After installation, one can lauch the msys shell like this:
C:\msys32\mingw32_shell.bat (for 32-bit Windows)
C:\msys32\mingw64_shell.bat (for 64-bit Windows)
Search and install packages:
## search for gcc
pacman -Ss gcc

## install gcc for 32bit windows
pacman -S mingw32/mingw-w64-i686-gcc

## install gcc for 64bit windows
pacman -S mingw64/mingw-w64-x86_64-gcc

## search for make
pacman -Ss make

## install make (for 32bit windows)
pacman -S mingw32/mingw-w64-i686-make

## install make (for 64bit windows)
pacman -S mingw64/mingw-w64-x86_64-make

## search for boost
pacman -Ss boost

## install boost (for 32bit windows)
pacman -S mingw32/mingw-w64-i686-boost

## install boost (for 32bit windows)
pacman -S mingw64/mingw-w64-x86_64-boost

## search for git
pacman -Ss git

## install git
pacman -S msys/git

Windows 10 with NetBeans 8.1

The GCC tools are found OK and compile failed missing rm.exe, so I added

,C:\msys32\usr\bin

to my PATH and now compiles, but Run fails

Unable to start pty process: The application failed with exit code -1073741515 (0xc0000135).
This could indicate that no required .dll was found in the PATH.
Please try to start the following command from the command shell (cmd.exe).
This may give some additional information.

--set-erase-key "C:\\msys32\\usr\\bin\\bash.exe" "-c" "exec /C/Users/Paul/Documents/NetBeansProjects/hello_world/dist/Debug/MinGW-Windows/hello_world.exe"

RUN FAILED (exit value -2, total time: 62ms)

I'd follow the suggestion but --set-erase-key isn't a command.

I can open a MSYS BASH window, or a Windows cmd.exe window

Suggestions as to what else I am missing please.

Paul
Back to top
ajeh



Joined: 28 Aug 2013
Posts: 53

PostPosted: Mon Mar 14, 2016 11:26 pm    Post subject: Re: C/C++; setting up MinGW and MSYS Reply with quote

Mark,

Do you mind updating this page http://wiki.netbeans.org/HowToSetup64-BitQt5WithNetBeans8.0OnWindows#Additional_Information with the info you posted above?

Thanks!

Mark Wilmoth wrote:
Also, you only need Cygwin for the netbeans terminal to work. But you don't need it, you can use external terminal or standard output. I stopped using Cygwin because it is difficult to install.

If you want something really slick that is updated frequently, install a 32-bit or 64-bit version of MSYS2 from here: https://msys2.github.io/

After installation, run "pacman -S make" to install GNU Make and "pacman S mingw-w64-x86_64-toochain" for 64-bit and "pacman -S mingw-w64-i686-toolchain" for 32-bit MinGW toolchains.


Mark

From: Mark Wilmoth <address-removed>
To: "address-removed" <address-removed>
Sent: Saturday, November 14, 2015 4:19 PM
Subject: Re: C/C++; setting up MinGW and MSYS


I believe your system path is mixed up. Make sure you system path only has one path to make.exe, rm.exe, etc. You should only have one path to a gcc toolchain. If you have /C/MinGW/msys/1.0/bin/ you do not need /C/Msys/bin because it should be exactly the same thing.


Mark



From: mich_nbf <address-removed> To: address-removed Sent: Tuesday, November 10, 2015 7:12 PM Subject: C/C++; setting up MinGW and MSYS
I've recently had several attempts to use MinGW with Netbeans. I have been using the Cygwin gcc sceheme for several years.With MinGW, I get stuck hereCode:"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-confmake.exe[1]: Entering directory `/c/Proj/NB/Welcome_MinGW'rm -f -r build/Debug 0 [main] rm 3752 open_stackdumpfile: Dumping stack trace to rm.exe.stackdumpmake.exe[1]: Leaving directory `/c/Proj/NB/Welcome_MinGW'make.exe[1]: *** [.clean-conf] Error 255make.exe": *** [.clean-impl] Error 2CLEAN FAILED (exit value 2, total time: 1m 50s)People seem to have had issues with not being able to find mkdir, which I suspect is somehow related to this.To use MinGW, do I have to remove Cygwin ? Can I use both, for different projects ? I'd seen the warning to keep the toolchains separate, they are both installed and the "toolchain validation" seems to take about 15 minutes but never complains.There seems to be conflicting suggestions about using C;\Msys\bin or C:\MinGW\msys\1.0\bin . Which is correct ?
Back to top
Mark Wilmoth
Posted via mailing list.





PostPosted: Wed Mar 23, 2016 7:29 am    Post subject: C/C++; setting up MinGW and MSYS Reply with quote

Unable to start pty process: The application failed with exit code -1073741515 (0xc0000135). This could indicate that no required .dll was found in the PATH. Please try to start the following command from the command shell (cmd.exe). This may give some additional information.


That message is because you have the terminal type set wrong in your project settings. It must be set to either "Standard Output" or "External Terminal". Look in your project properties->run->console type.


If you want to use the "Internal Terminal" option, you have to install cygwin.



Mark


From: pabristow <address-removed>
To: address-removed
Sent: Thursday, March 3, 2016 11:21 AM
Subject: C/C++; setting up MinGW and MSYS


I have a similar but different failure in the netup using

https://msys2.github.io/
After installation, one can lauch the msys shell like this:
C:\msys32\mingw32_shell.bat (for 32-bit Windows)
C:\msys32\mingw64_shell.bat (for 64-bit Windows)
Search and install packages:
## search for gcc
pacman -Ss gcc

## install gcc for 32bit windows
pacman -S mingw32/mingw-w64-i686-gcc

## install gcc for 64bit windows
pacman -S mingw64/mingw-w64-x86_64-gcc

## search for make
pacman -Ss make

## install make (for 32bit windows)
pacman -S mingw32/mingw-w64-i686-make

## install make (for 64bit windows)
pacman -S mingw64/mingw-w64-x86_64-make

## search for boost
pacman -Ss boost

## install boost (for 32bit windows)
pacman -S mingw32/mingw-w64-i686-boost

## install boost (for 32bit windows)
pacman -S mingw64/mingw-w64-x86_64-boost

## search for git
pacman -Ss git

## install git
pacman -S msys/git

Windows 10 with NetBeans 8.1

The GCC tools are found OK and compile failed missing rm.exe, so I added

,C:\msys32\usr\bin

to my PATH and now compiles, but Run fails

Unable to start pty process: The application failed with exit code -1073741515 (0xc0000135).
This could indicate that no required .dll was found in the PATH.
Please try to start the following command from the command shell (cmd.exe).
This may give some additional information.

--set-erase-key "C:\\msys32\\usr\\bin\\bash.exe" "-c" "exec /C/Users/Paul/Documents/NetBeansProjects/hello_world/dist/Debug/MinGW-Windows/hello_world.exe"

RUN FAILED (exit value -2, total time: 62ms)

I'd follow the suggestion but --set-erase-key isn't a command.

I can open a MSYS BASH window, or a Windows cmd.exe window

Suggestions as to what else I am missing please.

Paul
Back to top
Mark Wilmoth
Posted via mailing list.





PostPosted: Wed Mar 23, 2016 7:53 am    Post subject: C/C++; setting up MinGW and MSYS Reply with quote

All of the information is already there as parenthesis notes where you can install the MSYS2's MinGW and QT instead of manually downloading MinGW-builds and QT-x64 packages. QT-x64 packages are not available any longer, so you have to use the MSYS2's QT packages. (Unless someone can find another source for QT 64-bit packages.)


I believe MinGW-builds are not updating their packages as well as MSYS2 is - that is if they are even updating their packages at all now.


If the current instructions are followed precisely for the alternative installs of MSYS2's MinGW and QT, they should work. MSYS2 may also change installation and update procedures, so their instructions need to be followed too.

***The best way to proceed is, use MSYS2 for everything.***


It would probably be best to remove the obsolete/discontinued package routes and only include the MSYS2 way. I really don't use QT and have little enthusiasm to update the page any longer. I might update it though. Smile


Mark



From: ajeh <address-removed>
To: address-removed
Sent: Monday, March 14, 2016 6:26 PM
Subject: C/C++; setting up MinGW and MSYS


Mark,

Do you mind updating this page http://wiki.netbeans.org/HowToSetup64-BitQt5WithNetBeans8.0OnWindows#Additional_Informationwith the info you posted above?

Thanks!


Mark Wilmoth wrote:
Quote:
Also, you only need Cygwin for the netbeans terminal to work. But you don't need it, you can use external terminal or standard output. I stopped using Cygwin because it is difficult to install.

If you want something really slick that is updated frequently, install a 32-bit or 64-bit version of MSYS2 from here: https://msys2.github.io/(https://msys2.github.io/)

After installation, run "pacman -S make" to install GNU Make and "pacman S mingw-w64-x86_64-toochain" for 64-bit and "pacman -S mingw-w64-i686-toolchain" for 32-bit MinGW toolchains.


Mark

From: Mark Wilmoth <address-removed>
To: "address-removed" <address-removed>
Sent: Saturday, November 14, 2015 4:19 PM
Subject: Re: C/C++; setting up MinGW and MSYS


I believe your system path is mixed up. Make sure you system path only has one path to make.exe, rm.exe, etc. You should only have one path to a gcc toolchain. If you have /C/MinGW/msys/1.0/bin/ you do not need /C/Msys/bin because it should be exactly the same thing.


Mark



From: mich_nbf <address-removed> To: address-removed Sent: Tuesday, November 10, 2015 7:12 PM Subject: C/C++; setting up MinGW and MSYS
I've recently had several attempts to use MinGW with Netbeans. I have been using the Cygwin gcc sceheme for several years.With MinGW, I get stuck hereCode:"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-confmake.exe[1]: Entering directory `/c/Proj/NB/Welcome_MinGW'rm -f -r build/Debug 0 [main] rm 3752 open_stackdumpfile: Dumping stack trace to rm.exe.stackdumpmake.exe[1]: Leaving directory `/c/Proj/NB/Welcome_MinGW'make.exe[1]: *** [.clean-conf] Error 255make.exe": *** [.clean-impl] Error 2CLEAN FAILED (exit value 2, total time: 1m 50s)People seem to have had issues with not being able to find mkdir, which I suspect is somehow related to this.To use MinGW, do I have to remove Cygwin ? Can I use both, for different projects ? I'd seen the warning to keep the toolchains separate, they are both installed and the "toolchain validation" seems to take about 15 minutes but never complains.There seems to be conflicting suggestions about u!
sing C;\Msys\bin or C:\MinGW\msys\1.0\bin . Which is correct ?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo