Compiling as C instead of C++ in VS2008

Hi, i´m able to compile cuda code but only if it´s compiled as C++ code. I´m using VS2008 and the CUDA 3.2 build rules. After I´ve made some minor changes in my C code I could compile my program, but I´d rather use C code instead of C++. How can I setup VS2008 or CUDA build rules so I can do that?

Things that I had to change so I could compile my program:

time(NULL) instead of time()
typecast malloc() for the approriate variable type: char * buffer = (char*)malloc(…) instead of char * buffer = malloc(…)
specify the variable types in the pow function due to the overloaded instantes of this function…in C code I just called pow(a,B) no matter the types of a and b.
problems using unsigned char * as parameter to some functions (sprintf).

Thanks in advance,

JP

Hi, i´m able to compile cuda code but only if it´s compiled as C++ code. I´m using VS2008 and the CUDA 3.2 build rules. After I´ve made some minor changes in my C code I could compile my program, but I´d rather use C code instead of C++. How can I setup VS2008 or CUDA build rules so I can do that?

Things that I had to change so I could compile my program:

time(NULL) instead of time()
typecast malloc() for the approriate variable type: char * buffer = (char*)malloc(…) instead of char * buffer = malloc(…)
specify the variable types in the pow function due to the overloaded instantes of this function…in C code I just called pow(a,B) no matter the types of a and b.
problems using unsigned char * as parameter to some functions (sprintf).

Thanks in advance,

JP

Anyone can help me with this?

Anyone can help me with this?