fix build with gcc-4.7
add cp3dcg and cp3dug support