简体   繁体   English

在 Intellij 中编译 Erlang

[英]Compile Erlang in Intellij

I try compile erl files in Intellij with Erlang plugin.我尝试使用 Erlang 插件在 Intellij 中编译 erl 文件。 Everything is good with compilation but in out/production the folder does not create any files .beam and when I run console I get message:编译一切都很好,但在输出/生产中,文件夹不会创建任何文件.beam并且当我运行控制台时,我收到消息:

exception error: undefined function. 

When I use c("file").当我使用c("file"). everything is all right.一切正常。 Why does Intellij not create .beam files?为什么 Intellij 不创建.beam文件?

Try to fix it by going to Preferences -> Build, Execution, Deployment -> Erlang Compiler and check "Compile project with rebar".尝试通过转到 Preferences -> Build, Execution, Deployment -> Erlang Compiler 并选中“Compile project with rebar”来修复它。 Also, verify that rebar is installed and configured in IntelliJ by going to Preferences -> Other Settings -> Erlang External Tools and specifying the path to the rebar installation.此外,通过转到首选项 -> 其他设置 -> Erlang 外部工具并指定钢筋安装的路径,验证是否在 IntelliJ 中安装和配置了钢筋。

I was having the same issue ..我遇到了同样的问题..

The problem is very strange erlang plugin doesn't compile and copy the files to out directories meanwhile if you compiled from terminal or command prompt (windows) it is working fine.这个问题很奇怪二郎插件不编译和文件复制到out另外的目录,如果你从终端或命令提示符(Windows)编译它工作正常。 this issue arose after installing IntelliJ Idea v 15.安装 IntelliJ Idea v 15 后出现此问题。

What I have done here to fix the issue:我在这里做了什么来解决这个问题:

  • Uninstall Intellij Idea v 15卸载 Intellij Idea v 15
  • Downgrade IntelliJ Idead to version 14.1.4将 IntelliJ Idead 降级到14.1.4 版
  • Install Intellij Idea again (v. 0.5.11)再次安装 Intellij Idea (v. 0.5.11)
  • Configure SDK to reference src of erlang language.配置SDK引用erlang语言的src。
  • Create a new test project and start making the project again .. it should work fine...创建一个新的测试项目并再次开始制作该项目......它应该可以正常工作......

Hope this helps you希望这对你有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM