I am trying to compile a C project that uses Make and Configure with nvcc because I wan’t to re-write part of it in CUDA. When I run the configure script I pass CC=nvcc so that it uses nvcc as the compiler which works, but when it tries to link something I get the error:
nvcc fatal : Unknown option ‘WL,-soname’
I could edit the Configure script to not pass that option but that wouldn’t help because without specifying the shared object name as being different from the filename the program won’t link properly. How can I fix this problem? Does nvcc support this option with some alias, or can I use a different linker?
Thanks in advance, boonofcake.
EDIT:
The specific line the compilation process is failing on is:
You can savely use gcc (or whatever your favorite compiler is) for the linking stage if you pass it [font=“Courier New”]-lcudart[/font] to include the CUDA runtime library.
I would even go a step further and compile all files with gcc except the ones with CUDA code. There always is a small possibility that the CUDA language extensions interfere with conventional code, particularly in the header files. Happened to me a few times with the GUI libraries.