HI,
When I am trying below code I am getting linker error
#include<mqueue.h>
main()
{
mqd_t mq_id;
mq_id = mq_open(“my_queue”, O_RDWR|O_CREAT, 0777, 0);
printf(“mq_id = %d\n”, mq_id);
}
Error I am getting…
file mq1.o(/mq1.c) Undefined symbol mq_open_
cc: /usr/watcom/10.6/bin/wlink exited 1
Please let me know do i need to link any library to use message queue
mario
2
Check in the documentation of mq_open().
I checked it …its given as I have to
cc -L c filename.c nd need to link libc… Where can I find ‘libc’
Hello Colonal,
Try
cc –lc filename.c
with –lc “libâ€
Thanks! for the reply
Still the same error…
micro
6
qcc -lc filename.c
should work fine, at least it does here.
You have a standard installation?