Search code examples
c++g++cygwin

I want to type "g++" instead of "i686-pc-cygwin-g++" on Cygwin64 Terminal?


Everytime I have to compile with Cygwin64 Terminal, I have to write

$ i686-pc-cygwin-g++ myFile.cpp

Is there a way I can tell Cygwin that whenever I type g++ I'm actually referring to i686-pc-cygwin-g++ since it says -bash: g++: command not found when I type g++ .


Solution

  • As @Amadeus mentioned, it worked :

    $ alias g++=i686-pc-cygwin-g++

    Made me able to type g++ instead of i686-pc-cygwin-g++