-   Programming (
-   -   Trouble linking with libmqueue on Linux 2.6.5 -mm (

illuminatedwax 04-14-2004 07:55 AM

Trouble linking with libmqueue on Linux 2.6.5 -mm
I am trying to use the new realtime message queues with Linux and I have installed the new 2.6.5 -mm kernel and I have also installed the mqueue.h library.

However, whenever I try to link my file I get the message:

cache.o(.text+0x1dd4): In function `createCache(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned, unsigned, int, bool)':
: undefined reference to `mq_open(char const*, int, ...)'

I have even tried compling the library myself and then linking to it and even that doesn't work. I do 'nm' on the library and sure enough mq_open shows up on the list. I even checked the source code to make sure that the library and the header agreed on the function parameters.

I am also using C++ (and therefore g++) to compile this code.

What does work is if I try a) compiling the library myself as an object file instead of a library, b) writing a test program in C and use gcc to compile it. It links fine then.

What is going on?

All times are GMT -5. The time now is 05:04 PM.