6

I'm trying to learn C++ using NetBeans but even though I have CYGWIN and everything set up in my PATH, I keep getting an error that says: "No shell found. Cannot proceed. Please install either CYGWIN or Msys."

I don't know what Msys is but since the error says "or" I assume that if I have CYGWIN that I don't need to have Msys.

I'm trying to run the basic "Hello World!" tutorial but this error from what I've seen isn't covered. I'm getting aggravated because I have a project I need to have done in a few weeks.

If anyone has any answers for me, that would be great. I can supply screenshots if you need them.

user3657777
  • 61
  • 1
  • 2
  • Is the CYGWIN your only option? I use Netbeans with MinGW. You are right - the MSys is a part of the MinGW. – HEKTO May 20 '14 at 20:24
  • I've tried MinGW but I can't navigate the folders as well as I can with Cygwin. But I'll look more into it. – user3657777 May 21 '14 at 17:37

7 Answers7

1

Cygwin alone is not enough, first of all you have to check if you installed C++/gcc/gdb packages in your Cygwin.

From Cygwin/Net beans docs:

  1. Open the Control Panel (Start > Settings > Control Panel) and double-click the System program.
  2. Select the Advanced tab and click Environment Variables.
  3. In the System Variables panel of the Environment Variables dialog, select the Path variable and click Edit.
  4. Add the path to the cygwin-directory\bin directory to the Path variable, and click OK. By default, cygwin-directory is C:\cygwin. Directory names must be separated with a semicolon.
  5. Click OK in the Environment Variables dialog and the System Properties dialog.

If it fails you could try to Re-Install Netbeans from/within an cygwin/bash instance start the netbeans from a cygwin/bash instance.

Netbeans should automatically detect gdb/g++

PS: I'd prefer to use a good Gnu/Linux distro

Manos Nikolaidis
  • 21,608
  • 12
  • 74
  • 82
wdavilaneto
  • 788
  • 6
  • 7
1

I had the same problem with 8.1.

Adjusting the %PATH%-variable - in my case adding C:\msys64\usr\bin - solved it (as wdavilaneto's slightly verbose answer suggested).

TNT
  • 3,392
  • 1
  • 24
  • 27
0

This is not an answer but it adds to this question, I know that isn't very objective but in this case there may be a problem with Netbeans. I have 7.3 so this could be the reason. I am getting the same error but it used to work just fine, then one day it just stopped working and couldn't find the Shell. I have everything you need to make C/C++ work for Netbeans and it was working, for a while too!

Richard
  • 1,057
  • 1
  • 10
  • 22
0

It is rather old, but I've had the same issue a moment ago. It "Solved itself" by Creating a new "welcome sample" project and then made it run, then went back to my original project and made it run again. For me, it solved the problem. Probably it is related to an issue with Netbeans as Cian said.

Btw, I'm with Netbeans 8.1.

Edmilson Junior
  • 664
  • 5
  • 6
0

Make sure the shell is in your path! Depending whether you have Cygwin, Mingw32, Mingw32, TDM Mingw... it will be somewhere here:

c:\<installation path>\usr/bin
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
0

Hmh, I have 2 C compilers one for 64bit and one for 32bit set in NetBeans. When I had 32bit compiler without 64bit one then compiling went fine but when I have installed 64bit then NetBeans has started to do some problems, firstly everything went fine but then I started to get this problem to. For me fix is to switch from 64bit compiler back to 32bit compiler, then compile my program and then go back to 64bit compiler and now I can compile it with 64bit compile... Not sure why is this fixing it.

0

I have this problem with Netbeans 10.

Computer is Windows 10 x64.

Resolved by following the answer given by TNT.

Problem was when start building my project the said "no shell" (the topic of this posting) dialog box popped up. Since there was no command prompt, the build tools cannot run - process cannot spawn.

Solution was to give the correct path (environment variable). Since I am using MSYS, Since I am using MSYS, adding

F:\msys64\usr\bin

to my PATH made it work.

coarist
  • 789
  • 9
  • 11