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
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