I am trying to compile and link a CUDA project with the option -Wl,-rpath,libs/x86_64. For do it I add the option Xcompiler:
-Xcompiler -Wl,-rpath,libs/x86_64
but I get the follow error:
gcc: error: unrecognized command line option ‘-Wl’
gcc: error: unrecognized command line option ‘-rpath’
Also I tried to add a quotation marks:
-Xcompiler -Wl",-rpath,libs/x86_64"
an then I get the follow error:
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
I’m not sure if I need to put the quotations and if it is necessary I’m not sure where I need to put it. I tried to put the quotations in different positions but I get the same error…
The basic problem seems to be that -Xcompiler takes a single flag, but what you have right now is parsed as multiple flags, or a fla plus a filename, by the command-line parser. What happens if you try:
-Xcompiler "-Wl,-rpath,libs/x86_64"
or
-Xcompiler \"-Wl,-rpath,libs/x86_64\"
I don’t know whether the command-line parse “respects” quotation marks for grouping. Can the same information be supplied by separate command-line flags, rather than a compound one, e.g.
I am trying to execute some cuda test with Netbeans.
If I compile the project it works fine but when I want to execute the tests I have this problem. I think that the error is in my make files but I don’t understand this because the configuration for tests is the same of the project…
I have found the error. The problem was in the makefile. I added the option -Xcompiler “-Wl,-rpath,libs/x86_64” with the graphical interface in Netbeans but for some reason the make file was not update. I have edit the file configurations.xml and I have add the configuration option and now the makefiles is correct and works fine.