LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-26-2005, 12:07 AM   #1
mchitrakar
Member
 
Registered: Mar 2004
Posts: 93
Blog Entries: 1

Rep: Reputation: 15
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?
 
Old 08-27-2005, 05:37 AM   #2
sohmc
Member
 
Registered: Aug 2002
Location: Alexandria
Distribution: ubuntu 12.04.2
Posts: 217

Rep: Reputation: 30
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"
 
Old 08-27-2005, 07:49 AM   #3
mchitrakar
Member
 
Registered: Mar 2004
Posts: 93
Blog Entries: 1

Original Poster
Rep: Reputation: 15
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 >
 
Old 08-27-2005, 04:21 PM   #4
sohmc
Member
 
Registered: Aug 2002
Location: Alexandria
Distribution: ubuntu 12.04.2
Posts: 217

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
backward compatability iamthe Linux - Hardware 1 06-02-2005 06:37 PM
which all rpm packages should i have to install gcc with g++ support pradeepmenon777 Mandriva 3 02-13-2005 08:36 AM
Backward compatibility lenucks General 4 06-27-2004 02:34 AM
Going backward to go forward Wonderer Slackware 1 01-31-2004 07:14 AM
Question istalling Fortran 77 support for gcc marcoc Linux - Newbie 2 11-28-2002 05:58 AM


All times are GMT -5. The time now is 02:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration