Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

message queue makefile error: undefined reference to `mq_open'

Even though I have linked -lrt in my Makefile, as you can see below, I am still getting undefined reference to 'mq_open'. Please help!

all:get1 iserv1
get: get1.c
    gcc -Wall -o get1 get1.c -lrt
iserv: iserv1.c
    gcc -Wall -o iserv1 iserv1.c -lrt
clean:
    rm -fr *~ get1 iserv1
like image 775
gray_malkin Avatar asked Oct 22 '25 08:10

gray_malkin


1 Answers

Note -lrt should be at end not inbetween.

like image 133
Alok Prasad Avatar answered Oct 24 '25 23:10

Alok Prasad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!