Author Topic: Can't find g++ on Windows Vista with CygWin  (Read 8317 times)

DustyB

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Can't find g++ on Windows Vista with CygWin
« on: January 02, 2009, 05:44:51 AM »
Hello, I searched the forum posts and could not find this particular issue.  I am new to SE and Cygwin coming from a unix development background (xemacs, vi, gcc, make, grep, sed, awk...)  I am running a trial version of SE 2008 right on Windows Vista and have installed Cygwin so I could use gcc as Visual Studio Express 2008 doesn't have some of the basic K&R style C-isms that I am used to (in particular there is no main() method  ??? .)  SE seems to have recognized Cygwin was installed and tagged the header files correctly.

I have created a project using the GNU C/C++ Wizard as a C++ executable and build without a makefile.  However, when I try to build SE tells me it can't find g++.  When I look for g++ from within the cygwin shell it is under /usr/local/bin.

According to other posts on the forum SE uses CMD.EXE and in that shell (as well as windows explorer) c:\cygwin\usr\local\bin has no files under it.  The Cygwin documentation doesn't seem to indicate that there is anything special configuration that I need to do.  I do find a g++ (and gcc) in c:\cygwin\bin but pointing SE to use those generates some kind of abnormal termination which Vista then tries to find a solution for.  Currently I am building from the cygwin shell using make, however, if I purchase SE I would like to use the SE build/debug tools.  Any ideas?  Is my cygwin install not configured correctly for use with SE?

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Can't find g++ on Windows Vista with CygWin
« Reply #1 on: January 02, 2009, 10:53:08 AM »
Did you also select the right compiler in 'Project>Properties: Compile/Link tab' ?
Maybe it makes sense in your case to set the cygwin compiler as default compiler. You can do that via the dialog mentioned above (the '...' button) or by using 'Tools>Tag files: Auto Tag...'.

You might also have a look at these threads dealing with a proper cygwin:
http://community.slickedit.com/index.php?topic=1598.0
http://community.slickedit.com/index.php?topic=2330.0

Sometimes it's still useful/needed to use real makefiles even with SE coming with it's built-in 'vsbuild' tool.

Hope it helps, HS2

DustyB

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Can't find g++ on Windows Vista with CygWin
« Reply #2 on: January 02, 2009, 06:49:18 PM »
 ;D

After reading through the posts you linked to I discovered that I needed to add c:\cygwin\bin to my PATH (apparently the cygwin install doesn't do that?) and it now works.

Thank you hs2.

rlaa

  • Community Member
  • Posts: 5
  • Hero Points: 0
Re: Can't find g++ on Windows Vista with CygWin
« Reply #3 on: October 28, 2009, 03:03:00 PM »
I did add the path and still I am getting the following error:

Any idea please?

C:\vslick\win\vs-help>C: & cd C:\vslick\win\vs-help

C:\vslick\win\vs-help>echo VSLICKERRORPATH="C:\vslick\win\vs-help"
VSLICKERRORPATH="C:\vslick\win\vs-help"

C:\vslick\win\vs-help>"C:\Program Files\SlickEditV14.0.2\win\vsbuild" -signal 9009 -command g++ -c  -x c++  -g -o "Debug/samp1.o"  C:/vslick/win/files/samp1.c
VSLICKERRORPATH="C:\vslick\win\vs-help"
g++ -c -x c++ -g -o Debug/samp1.o C:/vslick/win/files/samp1.c
vsbuild: File not found (g++)

C:\vslick\win\vs-help>

OMGLOLLERCOPTER

  • New Community Member
  • Posts: 1
  • Hero Points: 1
Re: Can't find g++ on Windows Vista with CygWin
« Reply #4 on: October 28, 2009, 05:24:53 PM »
If you've added c:\cygwin\bin to your PATH, and SlickEdit is telling you that it cannot find g++ in said path, then you may want to look in that path.
« Last Edit: October 28, 2009, 05:42:49 PM by OMGLOLLERCOPTER »

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Can't find g++ on Windows Vista with CygWin
« Reply #5 on: October 28, 2009, 05:56:26 PM »
Try going to Build > GNU C/C++ Options > Compile tab and change "Compiler:" to 'g++-4' (no quotes) instead of the standard 'g++'.  You will need to do the same thing on the link tab. 

rlaa

  • Community Member
  • Posts: 5
  • Hero Points: 0
Re: Can't find g++ on Windows Vista with CygWin
« Reply #6 on: October 28, 2009, 09:50:44 PM »
Thanks, it worked...