I am new to C++. There is an application developed by my peers using Microsoft Visual Studio which compiles and runs as expected on Windows platform. I need to move this application to Unix server and run.
I was able to compile the programs and generate exe using the command below.
You didn't read the manual. You can read the manual by typing
% man gcc
At the command line.
The flag -MM implies -E, which directs the compiler to stop after the preprocessing stage. The output hello contains an auto-dependency rule for use with make.
Also, the current version of GCC is 7.2.0. You should consider updating.
If your application was written in C++, you should use the C++ compiler. It is named g++; gcc is merely the C compiler.