Code works in Dynare but not in Dynare++

Dear Dynare Community,
I am starting to learn Dynare for a course at the moment, and I am experiencing some issues. Mostly a code that works just fine if I run it in matlab “dynare example.mod” will given the following error if I use the windows 10 command prompt dynare++ example.mod C:\Users\Username\Dropbox\...\sandbox>dynare++ example2.mod Caught Dynare exception: Parse error at example2.mod, line 6, column 25: syntax error, unexpected NAME, expecting EQUAL_SIGN

The example2.mod file contains the following code:

// Based on

// %%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%
var y inv k lab r w c;
predetermined_variables k;  
//now dynare knows that k_t will be determined one period ahead, that is in t-1 
varexo z;
parameters cbeta cdelta calpha ca;

// %%%%%%%%%%%%%%%%%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%%

cbeta = 0.99;
cdelta = 0.25;
calpha = 0.33;
ca = 1;

// %%%%%%%%%%%%%%%%%%%%%%% MODEL BLOCK %%%%%%%%%%%%%%%%%%%%%

1/c = cbeta * 1/c(+1) * (1+r(+1) - cdelta);
ca / (1-lab) = w/c;
c= w*lab + (1+ r- cdelta)*k - k(+1);
r = exp(z) * (lab/k)^(1-calpha);
w = exp(z) * (k/lab)^(calpha);
y = exp(z) * k^calpha * lab^(1-calpha);
inv = y-c;

// This only gives dynare a starting place, it does not describe the steady state!

k =9;
c =0.7;
lab = 0.3;
w= 2;
steady(solve_algo=0); // there are four different solvers,... for linearized equtions dynare will always find a SS as it is 0

k =9;
c =0.7;
lab = 0.3;
w= 2;
// %%%%%%%%%%%%%%%%%%%%%%% SHOCKS %%%%%%%%%%%%%%%%%%%%%

var z;
periods 1:9;
//periods 10:20; if you want shock start in period 10 up to 20. e.g.: to test fisher!
values 0.1;


It works just fine in matlab, but creates this weird error in dynare++. I have the dynare++.exe in the respective folder and execute it beforehand. As the command window returns an error message I assume dynare++ is running in the background. I tried it both with Matlab closed and open. Can anyone help?

I am usuing win10x64, matlab2015b, dynare 4.43

thanks in advance!!


Dynare mod-files are not 100% compatible with Dynare++. You need to do various changes. For example, the predetermined_variables command is not supported and the shocks-block must be entered differently. See the Dynare++ manual on this.
Also not that the mod-file you wrote based on the Youtube video has wrong first order conditions for the real wage and real interest rate.