Message Queues
I am getting an error when I compile a simple code which send and recieve a message thru message queues.....I feel its something to do with library file,,,can any one help me out
the error is : tmp/ccGeGuhX.o(.text+0x141): In function `main': : undefined reference to `mq_open' /tmp/ccGeGuhX.o(.text+0x181): In function `main': : undefined reference to `mq_send' /tmp/ccGeGuhX.o(.text+0x1b3): In function `main': : undefined reference to `mq_receive' /tmp/ccGeGuhX.o(.text+0x234): In function `main': : undefined reference to `mq_close' collect2: ld returned 1 exit status |
Yes; this is a library problem. You need to pass the -llibname option to gcc, where libname is the name of the /usr/lib/libname.so (or .a) file to include.
Alternatively, just add the full path to the .so or .a file to the command-line. |
All times are GMT -5. The time now is 04:09 AM. |