Thank you Barry,

In fact, these are only C files (not C++) and i use the extern "C" 
directive.

I would prefer not to rename the files because many of these files serve 
also in other projects where they should have the .cpp extension
I would also not like to merge all the *.cpp files in one unique file 
because many users have to provide their own C file.

So i would really like to use some kind of configure or Make script, 
that should be put in the source directory tree of the R package.

Pierre

Barry Rowlingson a e'crit:
> 2008/8/11 Lafaye de Micheaux Pierre
> <[EMAIL PROTECTED]>:
>
>
>   
>> 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
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> EUR
>   


-- 
Pierre Lafaye de Micheaux 

Bureau 210, ba^timent BSHM
1251 avenue centrale BP 47
38040 GRENOBLE Cedex 09
FRANCE

Te'l.: 04.76.82.58.73 / Fax: 04.76.82.56.65
[EMAIL PROTECTED]
http://www.biostatisticien.eu


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to