Sign in to follow this  
metalman666

Help with MIinGW in netBeans 6.0

Recommended Posts

hello everyone! i want to use "MinGW" in netBeans 6.0, but i can't seem to make it work. I have exhausted all the resources on the net telling to set up MinGW in netBeans, but it don't work. Interestingly, my program's build is succesful everytime, but it fails only when i execute the run button. It just displays a command prompt and says "[press a key to continue]". I have been using VS quite a while now just wanted to switch the IDE. Any help will be greatly appreciated.

Share this post


Link to post
Share on other sites
Any reason you don't wanna use Cygwin instead of MinGW? I use it and it runs fine on NetBeans; never had a problem with it.

Share this post


Link to post
Share on other sites
Quote:
Original post by ajm0528
Any reason you don't wanna use Cygwin instead of MinGW? I use it and it runs fine on NetBeans; never had a problem with it.



The reason for not using Cygwin is i wanted a very light compiler,
as the MinGW site says, it is the minimalist system (Msys) i thought better give it a try.

Any way i would like to use Cygwin also, can any one help me with it.

Thanks

Share this post


Link to post
Share on other sites
One question: what happens if you run the program from outside the IDE?
You say that a prompt is shown with that text, but if you're programming in console mode, this is correct. Are you saying that it does not output the right thing? Does this happen also with a hello world program?

If the code compiles and the linker runs (in fact, you end up with an exe) then I suppose that your compilation chain works.

Anyway, if you want to try with Cygwin you just need to download the installer, then you must choose what you want (I'm not sure that g++, make and gdb are selected by default, so be sure that theyare checked). Then I don't really remember how to setup NetBeans to use those tools, but it should be trivial because I didn't had any issue...

Share this post


Link to post
Share on other sites
Quote:
Original post by cignox1
One question: what happens if you run the program from outside the IDE?
You say that a prompt is shown with that text, but if you're programming in console mode, this is correct. Are you saying that it does not output the right thing? Does this happen also with a hello world program?


yeah! that's the intersting part, if i use Msys from command line the program executes fine and displays the desired output. The problem arises only when i want to use the netBeans. I have all the setup done correctly, all the make files everything.

All my programs works fine in VS 2005. I use netBeans for java & VS for C++, thought that it will be better to work on one IDE...

Share this post


Link to post
Share on other sites
Quote:
Original post by cignox1
Anyway, if you want to try with Cygwin you just need to download the installer, then you must choose what you want (I'm not sure that g++, make and gdb are selected by default, so be sure that theyare checked). Then I don't really remember how to setup NetBeans to use those tools, but it should be trivial because I didn't had any issue...


I dont believe they are. When the downloader is open, click the VIEW button on the top right so you have the full list. Make sure everything is set to SKIP except: gcc-core, gcc-g++, gdb, and make. Those are all you need to be able to compile C/C++ programs within NetBeans. Once the installer is finished, NetBeans automatically recognizes them on the system (atleast mine did).

Good luck.

Share this post


Link to post
Share on other sites
Thanks a lot. All of u guys.

But for my problem i will post the exact error codes and msg. somtimes down the line. till then hope i can figure out the config of cygwin.

Thnx again!!!

Share this post


Link to post
Share on other sites
Quote:
Original post by metalman666
Thanks a lot. All of u guys.

But for my problem i will post the exact error codes and msg. somtimes down the line. till then hope i can figure out the config of cygwin.

Thnx again!!!


No problem. I forgot to mention, here is an install guide for Cygwin provided by NetBeans's website: Click here! You can also download Cygwin via a link on that page.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this