473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

strstream.h not found locate finds /usr/include/g++-3/strstream.h

here the output and my Compiler version, It is a basic example from Bjarne Stroustrups homepage,


morten@Westparkstr42:~/Bjarne_Stroustrup/06_Chapter_06$ g++ dc_except.c
dc_except.c:197:23: error: strstream.h: No such file or directory



g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

code from here

http://www.research.att.com/~bs/dc_except.c

I can locate the missing file

locate strstream.h
/usr/include/g++-3/strstream.h


My problem is, that I don't understand the error,
is my compiler misconfigured?

All C++ code examples from Bjarne Stroustrups Homepage should never complain or issue any warning.

Do I need to include something, Please?
Jul 10 '07 #1
4 7252
sicarie
4,677 Expert Mod 4TB
This may be a compiler issue - try moving the #include line to the top of the program with the others.
Jul 10 '07 #2
AdrianH
1,251 Expert 1GB
Interesting. I don't understand why they are using #include<strstream.h> instead of <strstream>. The include file with a .h is deprecated.


Adrian
Jul 10 '07 #3
#include <strstream> was put at the beginning.

//#include <strstream.h> just in front of main was commented out, after some try and error I found out that it is ok for the compiler to have tthe includes in the middle of the file. In some Microsoft source codes I have seen thet the includes were inserted at the end of the cpp sourcecode file, but that is more that strange.

That solved the problem, I still get noisy warnings,

g++ dc_except.c
In file included from /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/strstream:51,
from dc_except.c:199:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.


I put the entire session up here.

http://pastebin.ca/613456

But the warning is a little bit misleading.


morten@Westparkstr42:~/Bjarne_Stroustrup/06_Chapter_06$ locate strstream
/usr/include/c++/4.1.2/backward/strstream
/usr/include/g++-3/strstream
/usr/include/g++-3/strstream.h


I can use the example. What is the output of your locate strstream?

Do you also get strange warnings?
Jul 11 '07 #4
weaknessforcats
9,208 Expert Mod 8TB
What's strstream??

Do you mean sstream ??

Expand|Select|Wrap|Line Numbers
  1. #include <sstream>
  2.  
Jul 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bill Davy | last post by:
sys.path: H:\Husky\HostPC\V1\SHIP\Debug H:\Husky\HostPC\V1\SHIP E:\Bill\Python-2.4.1\PCbuild\python24_d.zip C:\Python24\Lib C:\Python24\DLLs C:\Python24\Lib\lib-tk H:\Husky\HostPC\V1\RunSHIP...
26
by: TomB | last post by:
I have a function on an "included" page. For reasons unknown to me I frequently will get an error - to the effect that the function can't be found. If I hit refresh/F5 it loads the page just...
4
by: amywolfie | last post by:
I would like to put code behind a Find button on a form which: 1) Performs a find based on a field on the form 2) If NO RECORDS ARE FOUND, then displays a custom "No Records Found" message box. ...
11
by: Wilsoch | last post by:
Long story short: My Access developer is letting me down. He doesn't really know VB and he can't figure out how to do what I need. Situation: Access database that will be used locally on...
14
by: NormD | last post by:
We have a client-server app using Web Services on an IIS machine. The trace below shows that .NET is searching around for some things (e.g., SystemDrawing.DLL and System.Drawing.EXE) and taking a...
7
by: mwt | last post by:
Is there a function in python that does what "locate" does in a bash shell? I know I could do it by using os.popen('locate'), but I'm curious if there's a Python "native" way to go about it....
2
by: francescomoi | last post by:
Hi. Working with PHP 4.3.10 on Fedora Core 2. I'm trying to execute phpize: /usr/local/php/bin/phpize: line 57: aclocal: command not found I've just installed: automake17-1.7.9-2...
2
by: aarthi28 | last post by:
Hi, I have this code that I am trying to compile, but I am getting the following errors 'CoInitializeSecurity': identifier not found 'EOAC_NONE' : undeclared identifier I have pasted the...
1
by: Thomas K. Nielsen | last post by:
Hi I dynamically insert some stylesheets. I want them to be placed before some javascript is executed. I know I can add an id to the scripttag that I want the stylesheets to be insert above, but I...
6
by: don | last post by:
I was trying to compile a .c source file using bcc on my winxp system but the only way this would work is if I put the stdio.h file in the same folder as the source file, even though my include...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.