1

I am complete Erlang novice, so this question might be complete nonsense.

I am trying to create a plugin for RabbitMQ, which I have to write in Erlang. To do this, I am using Erlide in Eclipse, and I am experimenting with the RabbitMQ Metronome example project.

I have managed to get it to compile and generate some .BEAM files. However, to get it into RabbitMQ, I need to generate an Erlang archive (.ez), which is a zip file containing the .BEAM files plus a .app file.

My problem is that I don't know how to generate the .app file. I tried just creating a file called "RabbitMQMetronome.app" in the "ebin" directory, but when I try to edit it, Eclipse warns that it is a "derived" file. This may be a red herring, as any other file in that directory gives the same warning.

So, my question is, how should I create the .app file using Erlide?

Thanks,

Carl

user2430147
  • 141
  • 1
  • 4

1 Answers1

1

The .app file is generally created from an .app.src file in src/. Most build tools do that, and so is erlide. So edit that one instead, and the .app file will be created when building.

A side note: For production code, I would not rely on erlide's build tools, but use rebar or erlang.mk or something else more battle-tested. These tools are more reliable (and also generate the .app file as above)

Vlad Dumitrescu
  • 931
  • 5
  • 11
  • Hello. Thanks for the response. I have tried using erlang.mk on Windows, which has involved installing MSYS2, but when I try to make the metronome example it fails partway through with "make[2]: Entering directory '/home/CarlB/rabbitmq-metronome-master/deps/rabbitmq_cli' GEN escript/rabbitmqctl /bin/sh: line 4: mix: command not found make[2]: *** [Makefile:108: escript/rabbitmqctl] Error 127" – user2430147 May 17 '21 at 11:32
  • I can't help you with that, I don't use erlang.mk, and on Windows most tools are lacking or not working, unfortunately... Does it work with erlide if you create an .app.src file in your src directory? – Vlad Dumitrescu May 18 '21 at 14:36