make cnc work with g++
fixed cnc build