Hello Guys,
I just made a little bit of progress to compile a program with stan header files using visual studio...
The program was:
#include "stdafx.h"
#include<stan.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
Yes it is minimal... Now, at least I am sure I can compile a program including stan.hpp.
I probably build gtest and run the existing tests, or hopefully someone gives me a test program :)
Here is my little notes:
1.compile libstan.lib using visual studio
To do this,
1.0 change the platform to x64(simply because I had a bad experience with 32bit in g++).
1.1 In properties, Include boost_1.54.0, eigen_3.2.0, and stan headers which come along with the source codes of stan.
1.2 move src\stan\agrad\rev\ver_stack.hpp and src\stan\agrad\rev\ver_stack.cpp to your build directory.
1.3 then build the project with debug and release mode, which creates new folder x64. which contains Debug and Release folders. Inside them, you find libstan.lib
2.compile stan program
To do this,
2.0 start new empty console program and change the platform to x64.
2.1 In properties, Include boost_1.54.0, eigen_3.2.0, and stan headers which come along with the source codes of stan.
2.2 In properties, add library directories where they have libstan.lib for debug and release modes.
2.3 In properties, In linker, there should add libstan.lib in additional dependencies.
2.4 then you can build debug and release mode :)
3. test a simple stan program
I am here.
I am not interested in compiling stanc.exe, but if anyone is interested, I may try :)