Question

Erlang RabbitMQ Client not working...(http://www.rabbitmq.com/erlang-client-user-guide.html)

Somehow my RabbitMQ Erlang client is not working.. It gives "can't find amqp_client.hrl" error when i try to compile it using

ERL_LIBS=deps erlc -o ebin amqp_example.erl 

Here are the steps I have taken.

  1. Created module amqp_example.erl
  2. Created deps folder
  3. Put rabbit-common and amqp_client inside deps folder
  4. Compiled using ERL_LIBS=deps erlc -o ebin amqp_example.erl

Can anyone let me know what I am missing. BTW I am very new to erlang.

Also, i want to create a application which can connect using websocket to ERlang (Preferably Cowboy) and from there I can connect to rabbitMQ

Was it helpful?

Solution 2

Got it worked. It required rabbitmq server which was not compiled properly.

OTHER TIPS

Can anyone let me know what I am missing.

The compiler error indicates that erlc is unable to locate the amqp_client.hrl header file. Post some example code detailing how you're including the header file. Normally you would use include_lib("amqp_client.hrl"). if you're telling the compiler about the location of the amqp_client application by setting the ERL_LIBS environment variable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top