 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
srini Guest
|
Posted: Sat Oct 25, 2003 8:33 am Post subject: problems in running programs in gcc 3.3.1 |
|
|
Hi,
I have been using LEDA for an year with old version of gcc (2.95). Now when
I upgraded my gcc to version 3.3.1, I get stange errors like the following:
~/LEDA/incl/LEDA/std/strstream.h:9:23: strstream.h: No such file or
directory
In file included from ~/LEDA/incl/LEDA/event.h:136,
from ~/LEDA/incl/LEDA/graph.h:39,
from ~/LEDA/incl/LEDA/graphwin.h:28,
from mappingall.c:3:
~/LEDA/incl/LEDA/event_macros.h:194:30: pasting "," and "_E1FMT0" do
es not give a valid preprocessing token
~/LEDA/incl/LEDA/event_macros.h:194:30: pasting "," and "_E1FMT0" do
es not give a valid preprocessing token
mappingall.c:2423: error: ISO C++ forbids assignment of arrays
mappingall.c:2428: error: ISO C++ forbids assignment of arrays
What should I do to run the program (I have lots of array assignements
and I don't want to change the code now). Is there any flags that I
can set to run the program.
Thanking in Advance
-srini
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Peter Skarpetis Guest
|
Posted: Sun Oct 26, 2003 5:16 am Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
srini wrote:
| Quote: | Hi,
I have been using LEDA for an year with old version of gcc (2.95). Now when
I upgraded my gcc to version 3.3.1, I get stange errors like the following:
~/LEDA/incl/LEDA/std/strstream.h:9:23: strstream.h: No such file or
directory
In file included from ~/LEDA/incl/LEDA/event.h:136,
from ~/LEDA/incl/LEDA/graph.h:39,
from ~/LEDA/incl/LEDA/graphwin.h:28,
|
use
#include <sstream>
instead. In gcc v3 strstream.h was removed as it has become legacy
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Lars Tetzlaff Guest
|
Posted: Sun Oct 26, 2003 7:14 pm Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
srini wrote:
| Quote: | Hi,
I have been using LEDA for an year with old version of gcc (2.95). Now when
I upgraded my gcc to version 3.3.1, I get stange errors like the following:
~/LEDA/incl/LEDA/std/strstream.h:9:23: strstream.h: No such file or
|
This can be fixed. In gcc 3.2.2 there was a file strstream.h in
/usr/include/c++/3.2.2/backward. In 3.3.x this file is missing. You can
copy it from an older version or put the following into a file
strstream.h in the backward-directory:
#ifndef _CPP_BACKWARD_STRSTREAM_H
#define _CPP_BACKWARD_STRSTREAM_H 1
#include "strstream"
using std::strstreambuf;
using std::istrstream;
using std::ostrstream;
using std::strstream;
#endif
| Quote: | directory
In file included from ~/LEDA/incl/LEDA/event.h:136,
from ~/LEDA/incl/LEDA/graph.h:39,
from ~/LEDA/incl/LEDA/graphwin.h:28,
from mappingall.c:3:
~/LEDA/incl/LEDA/event_macros.h:194:30: pasting "," and "_E1FMT0" do
es not give a valid preprocessing token
~/LEDA/incl/LEDA/event_macros.h:194:30: pasting "," and "_E1FMT0" do
es not give a valid preprocessing token
mappingall.c:2423: error: ISO C++ forbids assignment of arrays
mappingall.c:2428: error: ISO C++ forbids assignment of arrays
|
Are you using the option --pedantic? This may cause the problem.
Lars
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
kanze@gabi-soft.fr Guest
|
Posted: Tue Oct 28, 2003 12:40 am Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
Peter Skarpetis <peters (AT) riponce (DOT) com> wrote
| Quote: | srini wrote:
I have been using LEDA for an year with old version of gcc
(2.95). Now when I upgraded my gcc to version 3.3.1, I get stange
errors like the following:
~/LEDA/incl/LEDA/std/strstream.h:9:23: strstream.h: No such file or
directory
In file included from ~/LEDA/incl/LEDA/event.h:136,
from ~/LEDA/incl/LEDA/graph.h:39,
from ~/LEDA/incl/LEDA/graphwin.h:28,
use
#include
instead.
|
Which doesn't do the same thing, and would require extensive
modifications to the existing library.
| Quote: | In gcc v3 strstream.h was removed as it has become legacy
|
Sounds like they are doing a maximum, then, to make the compiler useless
for real world users.
--
James Kanze GABI Software mailto:kanze (AT) gabi-soft (DOT) fr
Conseils en informatique orientée objet/ http://www.gabi-soft.fr
Beratung in objektorientierter Datenverarbeitung
11 rue de Rambouillet, 78460 Chevreuse, France, +33 (0)1 30 23 45 16
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Kelsey Bjarnason Guest
|
Posted: Tue Oct 28, 2003 6:36 pm Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
[snips]
On Mon, 27 Oct 2003 19:40:03 -0500, kanze wrote:
| Quote: | use
#include
instead.
Which doesn't do the same thing,
|
No, indeed; it does standard C++ type things.
| Quote: | In gcc v3 strstream.h was removed as it has become legacy
Sounds like they are doing a maximum, then, to make the compiler useless
for real world users.
|
Nope; it's perfectly usable for C++ coders.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Ben Hutchings Guest
|
Posted: Wed Oct 29, 2003 1:24 am Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
[email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
<snip>
| Quote: | In gcc v3 strstream.h was removed as it has become legacy
Sounds like they are doing a maximum, then, to make the compiler
useless for real world users.
|
The older versions still exist; they haven't been taken off the
market. Cygnus still maintains gcc 2.9 (no, not 2.95) for a
customer that does not want to break binary compatibility by
switching to a later version.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Ron Natalie Guest
|
Posted: Wed Oct 29, 2003 1:38 am Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
<kanze (AT) gabi-soft (DOT) fr> wrote
| Quote: |
In gcc v3 strstream.h was removed as it has become legacy
Sounds like they are doing a maximum, then, to make the compiler useless
for real world users.
No, they are trying to make it MORE useful by making the default behavior |
consistant with the standard rahter than junking it up with all the garbage
that some GCC developer in the past thought was a neato idea at the time.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Gabriel Dos Reis Guest
|
Posted: Thu Oct 30, 2003 2:27 pm Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
[email]srisvce1 (AT) yahoo (DOT) com[/email] (srini) writes:
| Quote: | Hi,
I have been using LEDA for an year with old version of gcc (2.95). Now when
I upgraded my gcc to version 3.3.1, I get stange errors like the following:
~/LEDA/incl/LEDA/std/strstream.h:9:23: strstream.h: No such file or
directory
In file included from ~/LEDA/incl/LEDA/event.h:136,
from ~/LEDA/incl/LEDA/graph.h:39,
from ~/LEDA/incl/LEDA/graphwin.h:28,
from mappingall.c:3:
~/LEDA/incl/LEDA/event_macros.h:194:30: pasting "," and "_E1FMT0" do
es not give a valid preprocessing token
|
It looks like your code is trying do something like
#define PASTE(A, B) A ## B
// ....
PASTE(, _E1FMTO)
which is an invalid CPP operation.
--
Gabriel Dos Reis
[email]gdr (AT) integrable-solutions (DOT) net[/email]
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Gabriel Dos Reis Guest
|
Posted: Thu Oct 30, 2003 2:28 pm Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
Lars Tetzlaff <lars.tetzlaff (AT) gmx (DOT) net> writes:
| Quote: | srini wrote:
Hi,
I have been using LEDA for an year with old version of gcc (2.95). Now when
I upgraded my gcc to version 3.3.1, I get stange errors like the following:
~/LEDA/incl/LEDA/std/strstream.h:9:23: strstream.h: No such file or
This can be fixed. In gcc 3.2.2 there was a file strstream.h in
/usr/include/c++/3.2.2/backward. In 3.3.x this file is missing. You can
copy it from an older version or put the following into a file
strstream.h in the backward-directory:
|
The backward compatibility string stream header, as described in
appendice D, is spelled <strstream> (with no extension).
| Quote: | #ifndef _CPP_BACKWARD_STRSTREAM_H
#define _CPP_BACKWARD_STRSTREAM_H 1
#include "strstream"
|
Be careful: There is a standard header <strstream> (as described by
the standard) comming with 3.3.x
--
Gabriel Dos Reis
[email]gdr (AT) integrable-solutions (DOT) net[/email]
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Gabriel Dos Reis Guest
|
Posted: Thu Oct 30, 2003 2:29 pm Post subject: Re: problems in running programs in gcc 3.3.1 |
|
|
Peter Skarpetis <peters (AT) riponce (DOT) com> writes:
| Quote: | srini wrote:
Hi,
I have been using LEDA for an year with old version of gcc (2.95). Now when
I upgraded my gcc to version 3.3.1, I get stange errors like the following:
~/LEDA/incl/LEDA/std/strstream.h:9:23: strstream.h: No such file or
directory
In file included from ~/LEDA/incl/LEDA/event.h:136,
from ~/LEDA/incl/LEDA/graph.h:39,
from ~/LEDA/incl/LEDA/graphwin.h:28,
use
#include <sstream
instead. In gcc v3 strstream.h was removed as it has become legacy
|
In fact, it was renamed to
(in the backward compatibility section).
--
Gabriel Dos Reis
[email]gdr (AT) integrable-solutions (DOT) net[/email]
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|