I'm having a hard time understanding your question, but if you are saying you have made a program test.cpp and it compiles fine at the command line, and in visual studio but not in emacs, then maybe you need to use the full path in the compile command (g++ c:\path\to\test.cpp), or tell emacs which directory to try to compile in.
If you are trying to compile the game, then you would run build.bat instead of g++ directly, you can see the readme.txt in the game source download.