Hi,
I have a strange error. I have a C code that compiles fine under MS visual express. It has 4 files, main.c vec.h solver.h and solver.c. When I added a cuda file, cppint.cu and included the header solver.h I get the following error:
1>Compiling...
1>cppint.cu
1>c:\program files\nvidia corporation\nvidia cuda sdk\projects\minisat-c_v1.14.1 - graphic\solver.h(35): error: invalid combination of type specifiers
1>c:\program files\nvidia corporation\nvidia cuda sdk\projects\minisat-c_v1.14.1 - graphic\solver.h(36): error: expected an identifier
1>c:\program files\nvidia corporation\nvidia cuda sdk\projects\minisat-c_v1.14.1 - graphic\solver.h(37): error: expected an identifier
regardless of what I have in the .cu file. I am at the point where I only have the header file solver.h in the .cu file (nothing else its pretty much and empty file). When I take that out, the errors disappear and everything compiles fine even with the .cu file. I have tried using extern “C” {“solver.h”} but that didnt make a difference. I have had code in the .cu without the solver.h header file and it runs fine. I am sure the errors are not related to the solver.h since without adding it to the .cu file it compiles just fine. Just in case here is the code that generates the error in the solver.h:
typedef int bool;
static const bool true = 1;
static const bool false = 0;
Any help is very much appreciated…