ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm not sure about your Linux release, but mqueue.h exists in /usr/include on my Fedora Core 3 based system. I am also able to man the various mq_* functions so I know that the POSIX message queues are supported.
Thanks,
I found that I need glibc 2.3.4 (after 4/12/04). This RH 9 dist dated 2/2003 needs to be updated. I guess I either need fedora or RH enterprise.
Cool, glad that you were able to solve your problem. I am enjoying FC3. It seems to be very stable in the machines that I have installed it on (3 completely different systems, plus others that people at work are using). My work is "targeting" FC3 as the "recommended" distro for all of our Linux based server products.
I have FedoraCore 4 and I cannot find library support for the POSIX message queues. I know I have mqueue.h and I can link with the pthread library, but I cannot even find any documentation on which library the message queue services are in....
I get the man pages for all of the POSIX functions, and all of the include files are present where they should be. Now, to use threads someone explained to me that I need to explicitly include the pthread library using the gcc switch -lpthread, but this obviously does not include the mqueue functions as I get link errors for those. But I cannot find any reference on the Internet to which library those are contained in!
jfitzger68, I found the POSIX message queue functions for my FC3 based system. They are in /usr/lib/librt.* So, just adding -lrt to your link step should get them included. Try it and see what happens. BTW: libpthread is only good for the POSIX threads library, not the POSIX message queues.
It's not too bad up here... mid to upper 70s, I'd say. Sorry to hear you are roasting down in SJ. I'm not a heat person, myself. Cool Autumn days in New England is my favorite weather.
Sorry to bug you again. My program compiles and links, yet I get a "permission denied" runtime error when attempting to create a message queue. This happens even when I am running the program as root. None of the code examples I have seem do anything special and look pretty much like mine. Any ideas?
Sorry, but my knowledge of POSIX message queues is many, many years old. The last time that I attempted to use POSIX message queues was when I was writing a real-time embedded application running on top of QNX. I needed a message queue mechanism and all they supported was the POSIX message queues. The implementation used disk files as the actual queue mechanism, and I needed to run in a read-only DOC type of system, so I was forced to write my own RAM based message queue system...
Why don't you post your relevant open/creation code and I will see if anything seems obvious to me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.