Search code examples
g++cygwin

cygwin g++ produces no output


I just installed g++ from cygwin, when I try to compile a C++ file I am not getting any executable produced by the compiler, see example below. What's going wrong?

 Directory of C:\helloworld

01/02/2011  04:50 PM              .
01/02/2011  04:50 PM              ..
01/02/2011  04:48 PM                94 helloworld.cpp
               1 File(s)             94 bytes
               2 Dir(s)  24,658,272,256 bytes free

C:\helloworld>g++-4 helloworld.cpp

C:\helloworld>dir
 Volume in drive C is OS
 Volume Serial Number is C47B-942D

 Directory of C:\helloworld

01/02/2011  04:50 PM              .
01/02/2011  04:50 PM              ..
01/02/2011  04:48 PM                94 helloworld.cpp
               1 File(s)             94 bytes
               2 Dir(s)  24,657,747,968 bytes free

C:\helloworld>

Solution

  • The problem seems to be (judging from your C:\ prompt) that you are not running Cygwin. Try double-clicking the Cygwin icon.