[Rd] R CMD SHLIB uses foo.c instead of foo.cc if both are present (PR#2644)

faheem at email.unc.edu faheem at email.unc.edu
Sun Mar 16 19:47:57 MET 2003


Full_Name: Faheem Mitha
Version: 1.6.2
OS: Debian GNU/Linux
Submission from: (NULL) (209.42.199.193)


Suppose you are making a shared library using

R CMD SHLIB foo.cc

If there is a file called foo.c in the same directory, then it will be used
instead.

faheem ~/scratch/r-base>R CMD SHLIB foo.cc
gcc-3.0 -I/usr/lib/R/include   -D__NO_MATH_INLINES -mieee-fp  -fPIC  -g -O2
-c foo.c -o foo.o
g++-3.0 -shared  -o foo.so foo.o   -L/usr/lib/R/bin -lR

This has been rather annoying for me, because I sometimes write C and C++
versions of the same program side by side and so the files have the same
name except for the extensions. It should be possible to fix it, though I
don't understand the relevant scripts enough to suggest a patch.

Note this bug has also been reported by me as Debian bug #184969. You can access

this report via the web at
http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=184969

                                               Faheem.



More information about the R-devel mailing list