LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gcc backward support (https://www.linuxquestions.org/questions/linux-software-2/gcc-backward-support-357107/)

mchitrakar 08-26-2005 12:07 AM

gcc backward support
 
I am trying to recompile an old program using gcc. However, when I gcc it it shws error that
stream.h is not available. ( stream.h, a system file specified as always at #include <sys/stream.h> )
When I tried to find it , it was located at /usr/include/c++/3.2/backward/stream.h.
thus, either gcc is not able to locate stream.h or that I have missed a point somewhere. How
can I specify the system file-stream.h into gcc compiler?

sohmc 08-27-2005 05:37 AM

In the source, you should find something like:
Code:

#include <sys/stream.h>
change it to:
Code:

#include "/usr/include/c++/3.2/backward/stream.h"

mchitrakar 08-27-2005 07:49 AM

thank you very much. I guess I ought to do that. But unfortunately, there are many *.c where it has to be changed. that would be a sure good finger-exercise for me.
well....or perhaps i can grep and replace each by one u recommended. can I use following?
grep "#include <sys/stream.h>" | cat #include<...blah...blah >

sohmc 08-27-2005 04:21 PM

Quote:

Originally posted by mchitrakar
can I use following?
grep "#include <sys/stream.h>" | cat #include<...blah...blah >

well...hmmm...you could, but you wouldn't get the desired effect.

The "cheater" way around this would be to symlink stream.h into a place that CC looks. I would think if you created a sys directory in /usr/include and then symlinked:

Code:

#> ln -s /usr/include/c++/3.2/backward/stream.h /usr/include/sys/
give that a shot. see if that works. If not, you may need to change all the files.


All times are GMT -5. The time now is 09:28 PM.