fixed CUDA and C++ linking