Search code examples
windowscygwintar

Cygwin doesn't make an executable when expected


I'm running Cygwin on Windows 7 and trying to build a program I downloaded. I cd to where I have my file.tar.gz and type

tar -xvf file.tar.gz

and Cygwin successfully spits out a list of what's in there. (point of confusion: for some reason, -xvzf doesn't work, even though the file claims to be zipped. Also, I expected there to be an untarred folder put somewhere in my directory, but there's not.)

Then I type

make

and get

c++ -O -c gmm.c -o gmm.o

make: c++: No such file or directory

make: *** [makefile:19: gmm.o] Error 127

I expected this to create a gmm.exe (according to the documentation of this program). What's going on?


Solution

  • As @stark mentioned you are missing the C++ compiler.
    To find in which package is, use cygcheck -p to ask the Cygwin Webserver

    $ cygcheck -p bin/c++
    Found 17 matches for bin/c++
    ...
    binutils-2.35.2-1 - binutils: GNU assembler, linker, and similar utilities
    ...
    gcc-g++-10.2.0-1 - gcc-g++: GNU Compiler Collection (C++)
    gcc-g++-7.4.0-1 - gcc-g++: GNU Compiler Collection (C++)
    ...
    

    After you install the gcc-g++ package, you will have the program c++ in the standard directory for programs

    $ cygcheck -l "gcc-g++" |grep "usr/bin/c++"
    /usr/bin/c++.exe