infoMore than 5 years have passed since last update.
R for Windows Compile the given source files
Last updated at Posted at 2015-09-29
R for Windows ソースコードのコンパイル方法
Rtoolsのインストール
-
こちらからRtoolsをインストール
- Building R for WindowsからVersionにあわせてdownload ⇨インストール
- インストールするとPathに追加されます。
コマンドプロンプトの実行
- コマンドプロンプトの文字コードの変更
- R CMD実行時文字化けしない為に下記コマンドを実行
- Shift_jis → UTF-8
chcp 65001
R CMD SHLIBにてビルド
- オブジェクトファイルとライブラリが作成される
-
R CMD SHLIB src/C/pagerank.c -o lib/pagerank.so
- 複数ファイルの場合はこんな感じ
-
R CMD SHLIB src/C/util.c src/C/factor_model_util.c src/C/pagerank.c src/C/hierarchical.c src/C/factor_model_multicontext.c src/C/factor_model_util2.cpp -o lib/c_funcs.so
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
What you can do with signing up