I have installed all packages in cygwin. I have also added C:\\cygwin\\bin to my PATH variable. But when I try to compile a c++ file in command line I get the error \'Access
Unless you're a masochist, always use a Cygwin batch window with Cygwin executables. Also if you're using the Cygwin compiled gcc, you'll need the Cygwin DLL to run the results. The Cygwin website explains why. If you need executables without the Cygwin dll, I'd explore MinGW.