fix build with gcc-4.7
add cp3dcg and cp3dug support
Merge pull request #1 from 0lvin/master

cp3dcg + cp3dug support.