There’s one more thing I see amiss. Some versions of gcc/g++ tend to be more persnickety than other versions concerning this. The library/object link order is wrong:
g++ -I/usr/local/cuda/include -I/common/inc -L/usr/local/cuda/bin -L/usr/local/cuda/lib64 -L/lib -L/common/lib/linux -lcuda -lcudart -o autodock4 main.o libad.a -lm select_alloc_wrapper.o eval_wrapper.o
With gcc/g++, you are supposed to specify objects that have library dependencies before the libraries that they depend on. If you google “g++ library link order” you’ll find various attestations to this. Here is one example:
So the above command should really be:
g++ -I/usr/local/cuda/include -I/common/inc main.o libad.a select_alloc_wrapper.o eval_wrapper.o -L/usr/local/cuda/bin -L/usr/local/cuda/lib64 -L/lib -L/common/lib/linux -lm -lcuda -lcudart -o autodock4
Again, this would be a misunderstanding of whoever built the make file or the configure process.
Another possibility is that the nvcc being called is mismatched to the library in question - i.e. the nvcc being used is one in some other place besides /usr/local/cuda/bin
If you only have one CUDA version on your machine, this is unlikely to be the issue. But if you have multiple versions and have not updated the environment variable PATH properly, this could be causing the problem. It could also be a problem if somebody has moved some other nvcc version to a place like /usr/bin or something like that (which would be unusual).