1. 添加名为OTP_HOME和HOME的系统环境变量,值都为Erlang安装目录,如C:Program Fileserl5.9.1
  2. 生成PLT(耗时约20多分钟)
    在命令行输入以下命令(或放到.bat文件中):
    dialyzer –build_plt -r “%OTP_HOME%/lib/erts-5.9.1/ebin”
    dialyzer –add_to_plt –plt “%OTP_HOME%/.dialyzer_plt” -c “%OTP_HOME%/lib/kernel-2.15.1/ebin”
    dialyzer –add_to_plt –plt “%OTP_HOME%/.dialyzer_plt” -c “%OTP_HOME%/lib/stdlib-1.18.1/ebin”
    dialyzer –add_to_plt –plt “%OTP_HOME%/.dialyzer_plt” -c “%OTP_HOME%/lib/mnesia-4.7/ebin”
    dialyzer –add_to_plt –plt “%OTP_HOME%/.dialyzer_plt” -c “%OTP_HOME%/lib/crypto-2.1/ebin”
    dialyzer –add_to_plt –plt “%OTP_HOME%/.dialyzer_plt” -c “%OTP_HOME%/lib/sasl-2.2.1/ebin”
  3. 上述步骤会在Erlang安装目录下生成.dialyzer_plt文件
  4. cd到项目根目录,在命令行执行dialyzer -r ebin