Ubuntu, gcc library

55 views
Skip to first unread message

Joel LaBelle

unread,
May 25, 2021, 7:51:32 AM5/25/21
to rabbitmq-c-users
Hello and thanks for any noob help, I just installed rabbitmq-c.

mkdir build && cd build
cmake .. cmake --build .

This works creating:
/usr/local/lib/librabbitmq.a
/usr/local/lib/librabbitmq.so
/usr/local/include/amqp.h
/usr/local/include/rabbitmq-c

But when I go to examples and issue gcc,
gcc -Wall amqp_producer.c -L/usr/local/lib/ -I/usr/local/include/rabbitmq-c -lrabbitmq


I get this error:

amqp_bind.c:(.text+0xd6): undefined reference to `amqp_new_connection'
/usr/bin/ld: amqp_bind.c:(.text+0xec): undefined reference to `amqp_tcp_socket_new'
/usr/bin/ld: amqp_bind.c:(.text+0x10e): undefined reference to `die'
/usr/bin/ld: amqp_bind.c:(.text+0x12d): undefined reference to `amqp_socket_open'
/usr/bin/ld: amqp_bind.c:(.text+0x14d): undefined reference to `die'
/usr/bin/ld: amqp_bind.c:(.text+0x196): undefined reference to `amqp_login'
/usr/bin/ld: amqp_bind.c:(.text+0x1be): undefined reference to `die_on_amqp_erro

Joel LaBelle

unread,
May 27, 2021, 12:16:41 PM5/27/21
to rabbitmq-c-users

cmake -DBUILD_EXAMPLES=ON
cd examples
make all
Reply all
Reply to author
Forward
0 new messages