Compile Erlang in Intellij
Asked Answered
T

2

6

I try compile erl files in Intellij with Erlang plugin. 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:

exception error: undefined function. 

When I use c("file"). everything is all right. Why does Intellij not create .beam files?

Talc answered 6/11, 2015 at 16:53 Comment(6)
Do you compile with rebar? What is your project layout?Squadron
No, without rebar but my function are very simple like factorial. My friend use Intellij with Erlang plugin without any problems but I have.. I install Intellij and Erlang plugin, then I create new project with Erlang 18 SDK. I create new Erlang file in src folder. I should get beam file in production folder but I have nothing omitting "Compilation completed successfully" in log. When I write in Erlang console in Intellij cd(src). and c("file")., I create file beam and everything work..Talc
What do you mean production folder? Is it production or ebin?Squadron
When I clicked compile in my project's folder was created out/production and I think in this folder should was created beam file.Talc
It depends on 'Project structure' paths actually. Check them. Also check if you setup sdk path correclySquadron
Structure and sdk path is correctly.. It still doesn't work.Talc
L
3

Try to fix it by going to Preferences -> Build, Execution, Deployment -> Erlang Compiler and check "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.

Liu answered 6/9, 2017 at 13:3 Comment(0)
I
2

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. this issue arose after installing IntelliJ Idea v 15.

What I have done here to fix the issue:

  • Uninstall Intellij Idea v 15
  • Downgrade IntelliJ Idead to version 14.1.4
  • Install Intellij Idea again (v. 0.5.11)
  • Configure SDK to reference src of erlang language.
  • Create a new test project and start making the project again .. it should work fine...

Hope this helps you

Insignificancy answered 11/11, 2015 at 22:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.