Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Categories
- All Discussions1,524
- General534
- Graphics109
- GPU Computing419
- Mobile141
- Pro Graphics163
- Tools158
In this Discussion
- mcleary February 11
Tags in this Discussion
- cuda 422
NVCC compile error
-
Hello,
I am trying to compile a hello world version code.
For example:
__global__ void mykernal() {
}
int main() {
mykernall<<<1,1>>>();
printf("hello");
return 0;
}
And I got an error message like this:
In file included from /usr/local/cuda/bin//../include/driver_types.h:76,
from /usr/local/cuda/bin//../include/builtin_types.h:57,
from /usr/local/cuda/bin//../include/cuda_runtime.h:67,
from :0:
/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/include/limits.h:15:25: error: limits.h: No such file or directory
In file included from /usr/local/cuda/bin//../include/cuda_runtime.h:76,
from :0:
/usr/local/cuda/bin//../include/common_functions.h:64:20: error: string.h: No such file or directory
/usr/local/cuda/bin//../include/common_functions.h:65:18: error: time.h: No such file or directory
/usr/local/cuda/bin//../include/common_functions.h:76:15: error: new: No such file or directory
In file included from /usr/local/cuda/bin//../include/common_functions.h:159,
from /usr/local/cuda/bin//../include/cuda_runtime.h:76,
from :0:
/usr/local/cuda/bin//../include/math_functions.h:2293:18: error: math.h: No such file or directory
/usr/local/cuda/bin//../include/math_functions.h:2294:20: error: stdlib.h: No such file or directory
/usr/local/cuda/bin//../include/math_functions.h:2295:17: error: cmath: No such file or directory
/usr/local/cuda/bin//../include/math_functions.h:2296:19: error: cstdlib: No such file or directory
System config: I use MacOX Lion. Instead latest Xcode with llvm, besides, I am running on Intel Core 2 Duo and NVIDIA GeForce 9400M 256 MB. I am very confused by the error message.
Please help! and Thank! -
1 Comment sorted by
-
Did you setup your xcode to deal with CUDA files correctly? You need to create a build rule to handle *.cu files so they can be compiled with nvcc.
To check this, try compile your file in the command line.nvcc -o helloCuda helloCuda.cu