Nvcc likely does more than just that. You could try compiling it with gcc only to see whether the autoinits work with dynamic libraries. In face of mysterious issues like that, it is highly advisable to simplify things and add complexity bit-by-bit until you reproduce the issue.
I can not call gcc/g++ without call nvcc before. Compiling with static libraries is ok for me.
Thanks for the help.
The code must be tested. Only loaded until now.