If you are using the double precision version of Vensim you will need to use slightly different options to create the .dll file. You need to define the constant DBLPREC in the compile line. You also need to output the DLL mdlname_simdp.dll instead of mdlname_sim.dll. To make this easier Vensim calls the batch file mdldp.bat instead of mdl.bat for the double precision version of Vensim. This file is nearly identical to mdl.bat but uses the appropriate compile options and link statements.