Skip to content
Prev 23231 / 63424 Next

Detecting compilation under R

If R.h is not around, the preprocessor will throw a tantrum:

  cc    -c -o simple.o simple.c
  simple.c:2:15: error: R.h: No such file or directory

  - all of which would be solved if SHLIB and BUILD set a preprocessor 
flag to indicate compilation by R.

  I dont see what use USING_R is. If you #include <R.h> you get it, but 
then you know you're USING_R because you included R.h, hence USING_R is 
going to always be defined in that code (unless the inclusion of R.h is 
conditional on something else...).

  Oh but of course I've missed something... Just tell me what...

Barry