I’m trying to run CUDA 2.3 with the CUDA 2.3.1 drivers on Mac OS X 10.6 (10A421a) with gcc i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646).
If I try to build the examples I get:
$ make
make -C src/3DFD/
/usr/include/stdlib.h(272): error: expected an expression
/usr/include/stdlib.h(272): error: expression must have (pointer-to-) function type
/usr/include/stdlib.h(272): error: type name is not allowed
/usr/include/stdlib.h(274): error: expected a “)”
…
looking at /usr/include/stdlib.h(272):
#ifdef BLOCKS
int atexit_b(void (^)(void)); <---- line 272
void *bsearch_b(const void *, const void *, size_t,
size_t, int (^)(const void *, const void ));
#endif / BLOCKS */
So it looks like Apple’s new closures are enabled. Do I have something wrong with my configuration (I didn’t knowingly change any thing form the standard release) or is this a bug/misconfiguration somewhere in the Nvidia toolchain?