[R] Compiling only some C files
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Mon Aug 11 17:37:55 CEST 2008
2008/8/11 Lafaye de Micheaux Pierre
<Pierre.Lafaye-de-Micheaux at upmf-grenoble.fr>:
> I would like to be able to choose which *.cpp files will be compiled and to
> exclude some *.cpp files from the compilation.
> This is because some of my *.cpp files contain #include instructions calling
> some other *.cpp file.
> For example, file1.cpp would contain
> #include "file2.cpp"
> #include "file3.cpp"
>
If you don't want them compiled individually, rename them to
something other than .cpp.
Or change your system so that instead of including the C++ code, you
include a header (.h file) and link to the functions used. This is the
usual way to work, but you may be doing something really perverse in
your C++. I've never seen anyone try and include complete C++ files in
other C++ files....
Barry
More information about the R-help
mailing list