I use several different models which all share the same data block format. I would therefore like to put this data block into a separate file “standard_data_block.stan” and then use the #include mechanism mentioned in the manual. So at the top of each model I would place
However for this to work I need to specify an include-path. The manual only alludes to some mechanism for doing this but doesn’t specify the exact method. After looking through some of the source code, I think this is done by specifying --include-paths as a STANCFLAG when running make. However I can’t get this working properly, the compiler still complains that it couldn’t find the right include file.
This is the command I’m running, does it look correct? The model is bias_sens.stan, and in the same parent directory I have the data_block file.
peter at pzh in ~/cmdstan-2.17.1
$ make STANCFLAGS="–include-paths=/Users/peter/Desktop/stan2AFC/models" /Users/peter/Desktop/stan2AFC/models/bias_sens
— Translating Stan model to C++ code —
bin/stanc --include-paths=/Users/peter/Desktop/stan2AFC/models /Users/peter/Desktop/stan2AFC/models/bias_sens.stan --o=/Users/peter/Desktop/stan2AFC/models/bias_sens.hpp
could not find include file
make: *** [/Users/peter/Desktop/stan2AFC/models/bias_sens.hpp] Error 255
If it’s not correct, what is the command I should be using to specify an include path for STANC? Thank you!