Cygwin – Makefile-error: recipe for target `main.o’ failed

You see the two empty -D entries in the g++ command line? They’re causing the problem. You must have values in the -D items e.g. -DWIN32 if you’re insistent on using something like -D$(SYSTEM) -D$(ENVIRONMENT) then you can use something like: in the makefile which gives them default values. Your output looks to be missing the all important output: just to clarify, what actually … Read more

What is the difference between Cygwin and MinGW?

As a simplification, it’s like this: Compile something in Cygwin and you are compiling it for Cygwin. Compile something in MinGW and you are compiling it for Windows. About Cygwin Cygwin is a compatibility layer that makes it easy to port simple Unix-based applications to Windows, by emulating many of the basic interfaces that Unix-based operating systems … Read more

make: g++: Command not found

You need to install the development tools from GNU. I assume you’re on windows, in which case you have two options: cygwin and mingw. The former includes g++ out of the box. I’m less familiar with mingw, but the C++ Standard library appears to, also, be available. See these installation instructions, I’d recommend starting from step 1, if at all possible.

How do I install gcc on cygwin?

Ok. You should launch the installer of cygwin setup-x86_64.exe (if you have deleted it from your computer than just download it from https://cygwin.com/install.html). In the Cygwin Setup dialog window just press Next, and press Next again. In dialog “Cygwin Setup – Choose Installation Directory” you should select root directory in wich CygWin has been installed & … Read more

‘\r’: command not found – .bashrc / .bash_profile [duplicate]

When all else fails in Cygwin… Try running the dos2unix command on the file in question. It might help when you see error messages like this: -bash: ‘\r’: command not found Windows style newline characters can cause issues in Cygwin. The dos2unix command modifies newline characters so they are Unix / Cygwin compatible. CAUTION: the dos2unix command modifies files in place, … Read more

‘\r’: command not found – .bashrc / .bash_profile [duplicate]

When all else fails in Cygwin… Try running the dos2unix command on the file in question. It might help when you see error messages like this: -bash: ‘\r’: command not found Windows style newline characters can cause issues in Cygwin. The dos2unix command modifies newline characters so they are Unix / Cygwin compatible. CAUTION: the dos2unix command modifies files in place, … Read more