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.
Hi everyone,
I am in the process of porting an application from a BSD platform onto a Linux box. When compiling, I have found that some of the header files call for '<bits/stl_alloc.h>', which is missing from my computer. Does anyone have any idea as to where I can find this and/or why it is missing? I am running a Fedora 12 machine with GCC4.4.4. Thanks so much for your help!
When compiling, I have found that some of the header files call for '<bits/stl_alloc.h>', which is missing from my computer.
You should never include anything in "bits" directly. That is your real error. Figure out what header you should have really included and use that instead.
Ok I figured it was removed in an earlier version of GCC. So since many of my files depend on it, using GCC4.4.4 what can I use as a replacement to get my code to compile or will I need to rewrite all of it to bring it up to specification?
Yes, I realize that it is indeed possible to have multiple compilers running on the same system. However, that doesn't help me towards my end goal. I was given to task of porting this code over from a FreeBSD system to a Fedora 12 system and updating to current standards along the away. And for the include of the bits headers, I completely agree with you that they should never be included directly. However, I did not write this code myself and the person who did write it youused those includes directly and heavily relied on them. So my question is, when taking this code written for GCC3.3.x and moving it to modern day GCC4.4.4, is there anything that can mimic or replace the functionality of stl_alloc.h? Thanks so much for your replies!
Yes, I realize that it is indeed possible to have multiple compilers running on the same system. However, that doesn't help me towards my end goal. I was given to task of porting this code over from a FreeBSD system to a Fedora 12 system and updating to current standards along the away. And for the include of the bits headers, I completely agree with you that they should never be included directly. However, I did not write this code myself and the person who did write it youused those includes directly and heavily relied on them. So my question is, when taking this code written for GCC3.3.x and moving it to modern day GCC4.4.4, is there anything that can mimic or replace the functionality of stl_alloc.h? Thanks so much for your replies!
Obviously you are attempting to compile the code, and the compiler complained that it could not find stl_alloc.h. Since then, I presume you have deleted that include statement from the code, and you are getting additional compiler errors. Will you please share what these are?
Without having a reference point to what functionality was provided by the deprecated stl_alloc.h file, it's hard to assist you in finding a substitute. Although, you may want to try including <memory>.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.