S> # Compile and fit the Bayesian ARIMA model
fit ← stan(
- model_code = stan_code,
- data = stan_data,
- chains = 4,
- iter = 2000
- )
make cmd is
make -f “C:/PROGRA~1/R/R-43~1.1/etc/x64/Makeconf” -f “C:/PROGRA~1/R/R-43~1.1/share/make/winshlib.mk” CXX=‘(CXX14) (CXX14STD)’ CXXFLAGS=‘(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=‘(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=“file1ffc4b75325a.dll” WIN=64 TCLBIN= OBJECTS=“file1ffc4b75325a.o”
make would use
if test “zfile1ffc4b75325a.o” != “z”; then
if test -e “file1ffc4b75325a-win.def”; then
echo g++ -shared -s -static-libgcc -o file1ffc4b75325a.dll file1ffc4b75325a-win.def file1ffc4b75325a.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
g++ -shared -s -static-libgcc -o file1ffc4b75325a.dll file1ffc4b75325a-win.def file1ffc4b75325a.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
else
echo EXPORTS > tmp.def;
nm file1ffc4b75325a.o | sed -n ‘s/^.* [BCDRT] / /p’ | sed -e ‘/[.]refptr[.]/d’ -e ‘/[.]weak[.]/d’ | sed ‘s/[^ ][^ ]*/“&”/g’ >> tmp.def;
echo g++ -shared -s -static-libgcc -o file1ffc4b75325a.dll tmp.def file1ffc4b75325a.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
g++ -shared -s -static-libgcc -o file1ffc4b75325a.dll tmp.def file1ffc4b75325a.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
rm -f tmp.def;
fi
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1ffc4b75325a.o:file1ffc4b75325a.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D0Ev[_ZN3tbb8internal26task_scheduler_observer_v3D0Ev]+0x1c): undefined reference to tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1ffc4b75325a.o:file1ffc4b75325a.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x1c): undefined reference to
tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1ffc4b75325a.o:file1ffc4b75325a.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x37): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1ffc4b75325a.o:file1ffc4b75325a.c
Error in sink(type = “output”) : invalid connection
What is the mistake in the stan function?