質問編集履歴
1
g++とC++の動作確認のコードを実行し、その結果を記述
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,7 +25,6 @@
|
|
25
25
|
```
|
26
26
|
|
27
27
|
### 試したこと
|
28
|
-
|
29
28
|
関係あるかはわかりませんが、
|
30
29
|
rstanのインストール前に、以下のコードを実行して、「TRUE」になりました。
|
31
30
|
|
@@ -33,6 +32,39 @@
|
|
33
32
|
pkgbuild::has_build_tools(debug = TRUE)
|
34
33
|
```
|
35
34
|
|
35
|
+
追記(2019/06/23 8:40)
|
36
|
+
g++とC++の動作確認のコードを実行しました。どちらも成功しました。
|
37
|
+
|
38
|
+
g++のチェック(最後にgccのバージョンが表示されたら成功)
|
39
|
+
```R
|
40
|
+
> system('g++ -v')
|
41
|
+
```
|
42
|
+
結果
|
43
|
+
```R
|
44
|
+
Using built-in specs.
|
45
|
+
COLLECT_GCC=C:\TDM-GC~1\bin\G__~1.EXE
|
46
|
+
COLLECT_LTO_WRAPPER=C:/TDM-GC~1/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper.exe
|
47
|
+
Target: x86_64-w64-mingw32
|
48
|
+
Configured with: ../../../src/gcc-5.1.0/configure --build=x86_64-w64-mingw32 --enable-targets=all --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-cxx-flags=-DWINPTHREAD_STATIC --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-1 --with-bugurl=http://tdm-gcc.tdragon.net/bugs
|
49
|
+
Thread model: posix
|
50
|
+
gcc version 5.1.0 (tdm64-1)
|
51
|
+
[1] 0
|
52
|
+
```
|
53
|
+
c++の動作確認
|
54
|
+
```R
|
55
|
+
> fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) , 'return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ; ')
|
56
|
+
> fx( 2L, 5 )
|
57
|
+
```
|
58
|
+
結果
|
59
|
+
```R
|
60
|
+
bash.exe: warning: could not find /tmp, please create!
|
61
|
+
bash.exe: warning: could not find /tmp, please create!
|
62
|
+
/Rtools/bin/sed: -e expression #1, char 1: unknown command: `C'
|
63
|
+
/Rtools/bin/sed: couldn't flush stdout: Invalid or incomplete multibyte or wide character
|
64
|
+
```
|
65
|
+
```R
|
66
|
+
[1] 10
|
67
|
+
```
|
36
68
|
### 補足情報(FW/ツールのバージョンなど)
|
37
69
|
実行環境
|
38
70
|
Windows 10 Home
|