Use this plugin to compile c and c++ source under Maven 2 with compilers such as gcc, msvc, etc ...
Instructions on how to use the Native Maven Plugin can be found here.