Can you post the stan_model call that you’re using and the result of calling cat on the Stan and C++ files?
stan_model
cat