Compiling with NVCC

Hi All

I’m trying to compile my cuda application with nvcc. However I’m running into problems where seemingly the linker -I is not working.

The header (app.H) includes another header (dep.H) this in tern includes another header (dep2.H) and so on. In my make file I include a path to a directory where there are symbolic links to all of these headers. i.e nvcc -c -arch=sm_20 -I/path/to/dependencies app.cu

However when I execute this it returns: fatal error: dep.H: No such file or directory

I’d be very grateful if someone could point me to what I’ve done wrong.

compiler or linker…?

based on the compiler/ linker commands eclipse ‘proposes’ for my applications, i would think that the compiler consumes headers/ includes needed to compile code, and the linker consumes libraries as objects to link in additional (compiled) code

thus, -I (compiler) != -L (linker)

an example:

nvcc -I"/s_dump/cuda-workspace/TSD_NLP_main0_1/H_Base" -I"/s_dump/cuda-workspace/TSD_NLP_main0_1/H_Main" -G -g -O0

nvcc --cudart static -L/usr/lib64 --relocatable-device-code=true -gencode arch=compute_35,code=compute_35 -gencode arch=compute_35,code=sm_35

I guess I mean compiler, the NVCC description is “Specify include search paths.” which to me means the possible location of all the files that are included and therefore needed to compile. However the error is showing it can’t find them.

what happens when you do not use symbolic links - when you create an additional directory, place the raw header files (without) symbolic links in it, and include that as a path?

and your include path is in quotation marks?

Yes using a folder without symbolic links does seem to work. It seems that the symbolic links I have were relative links rather than definitive links.

i am not certain whether one can use symbolic links on pure headers…

and if this is indeed possible, i suppose ldconfig should then be run on such headers as ‘libraries’, and the path to the headers as ‘libraries’ placed in ldconfig’s cache (/etc/ld.so.conf)…