The specific compiler flags required vary by platform and by configuration considerations such as whether the servlet is compiled in debug mode or release mode.
The <installdir>\examples\servlet\12d directory contains a makefile that compiles all of the example servlets in release mode. The makefile in the <installdir>\examples\servlet\15d directory compiles the example servlets in debug mode.