eirik
June 10, 2008, 10:10am
1
I have setup a Visual Studio 2005 project with Qt. I have used the rulefile for *.cu files found on this forum and applied it to my project. When compiling the .cu file I get strange errors. The compiler cannot find uint datatype nor constants declared in math.h. I have added the appriopriate include dir’s and libraries to the project. The nvcc command line can be seen below.
nvcc.exe -ccbin "C:\Program Files\Microsoft Visual Studio 8\VC\bin" -c -Xcompiler "/EHsc /W3 /nologo /Wp64 /O2 /Zi /MT " -o Debug\cudasqrt3Kernel.obj cudasqrt3Kernel.cu
Has anyone had similar problems? Any suggestions are much appreciated.
kyzhao
June 10, 2008, 10:12am
2
I have setup a Visual Studio 2005 project with Qt. I have used the rulefile for *.cu files found on this forum and applied it to my project. When compiling the .cu file I get strange errors. The compiler cannot find uint datatype nor constants declared in math.h. I have added the appriopriate include dir’s and libraries to the project. The nvcc command line can be seen below.
nvcc.exe -ccbin "C:\Program Files\Microsoft Visual Studio 8\VC\bin" -c -Xcompiler "/EHsc /W3 /nologo /Wp64 /O2 /Zi /MT " -o Debug\cudasqrt3Kernel.obj cudasqrt3Kernel.cu
Has anyone had similar problems? Any suggestions are much appreciated.
[snapback]391327[/snapback]
Can’t find the include dirs & libs in ur command line. where did u put them in the project?
eirik
June 10, 2008, 10:17am
3
I put them in the project properties under C++ and Linker properties.
kyzhao
June 10, 2008, 10:44am
4
You should put the include dirs into the cu compiler but not C++ compiler.
If u added the rules, you can add the include dirs in the CUDA general category;
Or you can also add the dirs into the custom compiler rule;
eirik
June 10, 2008, 12:34pm
5
You should put the include dirs into the cu compiler but not C++ compiler.
If u added the rules, you can add the include dirs in the CUDA general category;
Or you can also add the dirs into the custom compiler rule;
[snapback]391337[/snapback]
Thanks a lot. So far I’ve removed most errors. Now the problem that persists is that atomicAdd function is not found. I have included the sm_11_atomic_functions.h and added the $(CUDA_INC_PATH). What am I missing to get this included?
SOLVED! (I had forgotten the -arch sm_11)
kyzhao
June 10, 2008, 12:43pm
6
Thanks a lot. So far I’ve removed most errors. Now the problem that persists is that atomicAdd function is not found. I have included the sm_11_atomic_functions.h and added the $(CUDA_INC_PATH). What am I missing to get this included?
[snapback]391382[/snapback]
I’m not sure which lib contents the atomicAdd function……
You can check it in example, and find the lib name, then add it to the project^_^
eirik
June 10, 2008, 1:09pm
8
Thanks for your help. It’s much appreciated.