LoginSignup
0
0

More than 5 years have passed since last update.

R packageにおけるhppファイル(C++ヘッダー)に対する警告

Posted at

RのパッケージにC++コードを含める場合、src/フォルダに入れる決まりです。src/フォルダにあるファイルはすべてソースとみなされて、パッケージのビルドする際にコンパイルされます。

C++では、ヘッダファイルを用意してそこに関数やクラスの定義をまとめることがよくあり、その際によく使われる拡張子が.hppなのですが、src/フォルダに.hppファイルが含まれているとパッケージのチェック時に警告がでます。

These are unlikely file names for src files.

Rパッケージの仕様書によると、

We recommend using .h for headers, also for C++ or 
Fortran 9x include files. 

ということで、どうやら.hを拡張子に使うのが正しいようです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0