problem about gcc3.2 on solaris8(intel)

problem about gcc3.2 on solaris8(intel)

Post by hpyhp » Sat, 15 Feb 2003 11:37:58



Download and installed gcc3.2 from From www.sunfreeware.com.
But when use it ,I can't find <sting>,<iostream>,why?

such as test.c:

#include <stdio.h>
main()
{
   printf("%s\n","hpy");

Quote:}

gcc -o test test.c ---> OK

But test2.cpp:

#include <string>
#include <iostream>
main()
{
        string a="test2.cpp";
        cout<<a;

Quote:}

g++ -o test test2.cpp --->So bad*_*

In file included from
/usr/local/include/c++/3.2.1/backward/iostream.h:31,
                 from test2.cpp:3:
/usr/local/include/c++/3.2.1/backward/backward_warning.h:32:2:
warning: #warning
 This file includes at least one deprecated or antiquated header.
 Please conside
r using one of the 32 headers found in section 17.4.1.2 of the C++
standard. Exa
mples include substituting the <X> header for the <X.h> header for
C++ includes,
 or <sstream> instead of the deprecated header <strstream.h>. To
 disable this wa
rning use -Wno-deprecated.
test2.cpp: In function `int main()':
test2.cpp:7: `string' undeclared (first use this function)
test2.cpp:7: (Each undeclared identifier is reported only once for each
   function it appears in.)
test2.cpp:7: parse error before `=' token
test2.cpp:8: `a' undeclared (first use this function)

why I can't find <string>? already include it
/usr/local/include/c++/3.2.1/

help...

--
Posted via http://dbforums.com

 
 
 

1. Network problem at Solaris8 Intel

Hello,

Please tell me any answer below a problem.
My PC's(Solaris8 Intel) does not send any correct ICMP pakets to another PC.
The PC's hardware are M/B:P3B-F, NIC:3com905-TX,OS:Soalris8(10/00)

My LAN is 2PC's and 10M/HAB. One PC is Windows98.
The LED of HAB had brink when I tried to take a command as ping at Solaris's PC.
Then I understand Solaris's PC send some  ICMP pakets to Windows's PC.
But Windows's PC does not responce to them. I already make sure the HAB and
Cables with 2 windows's PC.

Regards,
Yoshi

2. dbx (and FORTRAN?)

3. gcc2.95.3 + solaris8 (intel) problem

4. rsh hostname variable?

5. I'm installing solaris8 intel edition.

6. Netgear DG814

7. Solaris8/Early Access / Intel, wont install.

8. KDE 1.1pre2 and some questions

9. trouble on NIS server on Solaris8(intel)

10. Can't install Solstice DiskSuite4.2 and AdminSuite2.3 to Solaris8(intel edition)

11. Solaris8/Intel

12. openSSL and apache on intel solaris8

13. XFree86 4.1.0 on Intel Solaris8