Got it worked. It required rabbitmq server which was not compiled properly.
Erlang RabbitMQ client example not working
Вопрос
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.
- Created module amqp_example.erl
- Created deps folder
- Put rabbit-common and amqp_client inside deps folder
- 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
Решение 2
Другие советы
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.