Problem in Dynamic Library

I can not call gcc/g++ without call nvcc before. Compiling with static libraries is ok for me.