C:\Users\root\Desktop>pathPATH=c:\mingw32-dw2\bin;c:\rtools\bin;C:\Rtools\gcc-4.6.3\bin;C:\Program Files\R\R-2.15.1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\SlikSvn\bin;C:\Program Files (x86)\pdftk-1.44-win-install\bin;C:\Program Files\Vim\vim73
C:\Users\root\Desktop>type a.cpp#include <iostream>
int main(int argc, char **argv) { std::cout << "test." << std::endl; try { throw std::exception(); } catch (const std::exception& e) { } return 0;}
C:\Users\root\Desktop>clang++ a.cpp
C:\Users\root\Desktop>a.outtest.CRAN also suggests compiling Rcpp from source. If you do that, can you get clang to pass test-unit on Windows?
--
That is good. What I meant to say was whether you could execute any model. I have a couple of Windows machines here, so I will try to duplicate your success.
clang -I src -I lib/eigen_3.1.2 -I lib/boost_1.52.0 -)3 -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -c -DGTEST-HAS_PTHREAD=0 -I lib/gtest_1.6.0/include -I lib/gtest_1.6.0 src/test/agrad/matrix_test.cpp -o test/agrad/matrix.o
Assertion failed: Result.isInvalid() && "C++ binary operator overloading is missing candidates!", file /Users/as1/Projects/llvm/release/3.1/src/tools/clang/lib/Sema/SemaOverload.cpp, line 10123
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
clang: error: clang frontend command failed with exit code 3 (use -v to see invocation)
make: *** [test/agrad/matrix.o] Error 3
--
In RStan, some models can be compiled and run using this clang if Rcpp is rebuilt. (In order to install Rcpp from source using this clang, a gcc for 64 bits such as the one in rtools is still needed since both 32 and 64 bits of Rcpp would be built by R's package installation script.)The problem with clang I have so far is that it fails for model src/basic_distributions/inv_wishart. Using Stan from command line, I found the error message is "The instruction at 0x76ff99777 referenced memory at 0xffffffff. The memory could not be read." R would crash for this model.Using another gcc, RStan could run all example models in Stan.
I came across this and that's why I mentioned somewhere there was a bug for clang 3.1.So I am using 3.2.
clang --version
This application has failed to start because pthreadGC2.dll was not found. Re-installing the application may fix this problem.
--
--
No, I have other problems with the gcc is not compatible with clang.What do you mean by Rueben's most recent gcc? Not the one I pointed to?
--
Aha! I haven't installed Git on that computer yet. I just downloaded the v1.1.0 tarball. I will try to slip that pthreadgc2.dll in.
goodrich@CYBERPOWERPC:/opt/stan$ head /tmp/linker_errors.txt
uname: not found
uname: not found
cygwin warning:
MS-DOS style path detected: src\stan/command/stanc_helper.hpp
Preferred POSIX equivalent is: src/stan/command/stanc_helper.hpp
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
bin/stan/command/stanc.o:fake:(.text+0x16): undefined reference to `std::allocator<char>::allocator()'
bin/stan/command/stanc.o:fake:(.text+0x31): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
--