public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* g++ 3.1.1 issue
@ 2002-08-01  5:47 Dmitry Kostenko
  2002-08-01  9:18 ` Ricardo Anguiano
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Kostenko @ 2002-08-01  5:47 UTC (permalink / raw)
  To: gcc

I've downloaded & installed gcc 3.1.1 from
gcc.gnu.org, it compiled OK but I've got a problem:
gcc does compile c++ sources but is not
autoconfigured to find STL include headers.
for example, such main.C will compile:
int main()
{  return 0; }

and such file won't:

#include <iostream>
int main()
{
  std::cout << "Hello, World!\n";
  return 0;
}

when I say gcc main.C, it says <iostream>
not found, and std is not a namespace...

I've search to installation guide, it
doesn't say much about such problem.
Where to find documentation on gcc configuration.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: g++ 3.1.1 issue
  2002-08-01  5:47 g++ 3.1.1 issue Dmitry Kostenko
@ 2002-08-01  9:18 ` Ricardo Anguiano
  2002-08-01 10:03   ` Phil Edwards
  0 siblings, 1 reply; 7+ messages in thread
From: Ricardo Anguiano @ 2002-08-01  9:18 UTC (permalink / raw)
  To: Dmitry Kostenko; +Cc: gcc

"Dmitry Kostenko" <bis0n@mail.ru> writes:

> I've downloaded & installed gcc 3.1.1 from gcc.gnu.org, it compiled
> OK but I've got a problem: gcc does compile c++ sources but is not
> autoconfigured to find STL include headers.  for example, such
> main.C will compile:
>
> int main()
> {  return 0; }
> 
> and such file won't:
> 
> #include <iostream>
> int main()
> {
>   std::cout << "Hello, World!\n";
>   return 0;
> }
> 
> when I say gcc main.C, it says <iostream> not found, and std is not
> a namespace...

Did you mean `g++ main.C'?

-- 
Ricardo Anguiano             anguiano@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: g++ 3.1.1 issue
  2002-08-01  9:18 ` Ricardo Anguiano
@ 2002-08-01 10:03   ` Phil Edwards
  2002-08-02  2:12     ` Re[2]: " Dmitry Kostenko
  2002-08-02  2:14     ` Dmitry Kostenko
  0 siblings, 2 replies; 7+ messages in thread
From: Phil Edwards @ 2002-08-01 10:03 UTC (permalink / raw)
  To: Ricardo Anguiano; +Cc: Dmitry Kostenko, gcc

On Thu, Aug 01, 2002 at 09:18:15AM -0700, Ricardo Anguiano wrote:
> "Dmitry Kostenko" <bis0n@mail.ru> writes:
> > 
> > when I say gcc main.C, it says <iostream> not found, and std is not
> > a namespace...
> 
> Did you mean `g++ main.C'?

'gcc main.C' should still work.  The difference between gcc and g++ really
doesn't matter until you get to the linking stage.  If the user is on a
case-insensitive filesystem, where main.C could be interpreted as main.c,
then there would e a difference there as well.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re[2]: g++ 3.1.1 issue
  2002-08-01 10:03   ` Phil Edwards
@ 2002-08-02  2:12     ` Dmitry Kostenko
  2002-08-02  2:14     ` Dmitry Kostenko
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Kostenko @ 2002-08-02  2:12 UTC (permalink / raw)
  To: Phil Edwards; +Cc: Ricardo Anguiano, gcc


-----Original Message-----
From: Phil Edwards <phil@jaj.com>
To: Ricardo Anguiano <anguiano@codesourcery.com>
Date: Thu, 1 Aug 2002 13:02:57 -0400
Subject: Re: g++ 3.1.1 issue


OK. I'll tell everything from the beginning, because I see
my first letter was quite ... messy :)))

I have a Linux Slackware 8.0 system and I've downloaded, compiled
and installed GCC 3.1.1 + G++ on it. Everything was OK. Until I tried to
compile QT 3.0.4. It failed, saying it couldn't find C++ STL headers. They are
in place, but gcc doesn't look for them automatically when compiles C++ files
(.C, .cc, .cpp, .c++).
So if I compile a C++ file without any reference to STL (or libstdc++),
everything goes OK, but it I try to compile a simple hello world, it fails. For
example I write main.cpp:

#include <iostream>
#include <iomanip>

int main()
{
  std::cout << "Hello, World!" << std::endl;

}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re[2]: g++ 3.1.1 issue
  2002-08-01 10:03   ` Phil Edwards
  2002-08-02  2:12     ` Re[2]: " Dmitry Kostenko
@ 2002-08-02  2:14     ` Dmitry Kostenko
  2002-08-02  8:54       ` Phil Edwards
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitry Kostenko @ 2002-08-02  2:14 UTC (permalink / raw)
  To: Phil Edwards; +Cc: Ricardo Anguiano, gcc


-----Original Message-----
From: Phil Edwards <phil@jaj.com>
To: Ricardo Anguiano <anguiano@codesourcery.com>
Date: Thu, 1 Aug 2002 13:02:57 -0400
Subject: Re: g++ 3.1.1 issue


OK. I'll tell everything from the beginning, because I see
my first letter was quite ... messy :)))

I have a Linux Slackware 8.0 system and I've downloaded, compiled
and installed GCC 3.1.1 + G++ on it. Everything was OK. Until I tried to
compile QT 3.0.4. It failed, saying it couldn't find C++ STL headers. They are
in place, but gcc doesn't look for them automatically when compiles C++ files
(.C, .cc, .cpp, .c++).
So if I compile a C++ file without any reference to STL (or libstdc++),
everything goes OK, but it I try to compile a simple hello world, it fails. For
example I write main.cpp:

#include <iostream>
#include <iomanip>

int main()
{
  std::cout << "Hello, World!" << std::endl;
  return 0;
}

And then issue a command:
$ gcc main.cpp
I fails to compile and says, it can't find iostream and iomanip.

The question is How to config gcc to search for standrard headers
automatically?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: g++ 3.1.1 issue
  2002-08-02  2:14     ` Dmitry Kostenko
@ 2002-08-02  8:54       ` Phil Edwards
  2002-08-03  6:15         ` Re[2]: " Dmitry Kostenko
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Edwards @ 2002-08-02  8:54 UTC (permalink / raw)
  To: Dmitry Kostenko; +Cc: Ricardo Anguiano, gcc

On Fri, Aug 02, 2002 at 01:13:54PM +0400, Dmitry Kostenko wrote:
> The question is How to config gcc to search for standrard headers
> automatically?

GCC already searches for these headers automatically, unless it has been
misinstalled.  Please give your configuration line, and the output of "gcc -v",
and the exact error message you're seeing.

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re[2]: g++ 3.1.1 issue
  2002-08-02  8:54       ` Phil Edwards
@ 2002-08-03  6:15         ` Dmitry Kostenko
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Kostenko @ 2002-08-03  6:15 UTC (permalink / raw)
  To: Phil Edwards; +Cc: Ricardo Anguiano, gcc

Everything is OK already... I really
have misinstalled gcc. I've corrected that.
Thank you for help :)








> GCC already searches for these headers automatically, unless it has been
> misinstalled.  Please give your configuration line, and the output of "gcc
-v",
> and the exact error message you're seeing.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-08-03 13:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-01  5:47 g++ 3.1.1 issue Dmitry Kostenko
2002-08-01  9:18 ` Ricardo Anguiano
2002-08-01 10:03   ` Phil Edwards
2002-08-02  2:12     ` Re[2]: " Dmitry Kostenko
2002-08-02  2:14     ` Dmitry Kostenko
2002-08-02  8:54       ` Phil Edwards
2002-08-03  6:15         ` Re[2]: " Dmitry Kostenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).