Gentoo Archives: gentoo-user-br

From: Marcus Vinicius <mvleandro@×××××.com>
To: gentoo-user-br@l.g.o
Subject: [gentoo-user-br] [Resolvido] Quais pacotes para programação?
Date: Wed, 30 May 2007 18:40:12
Message-Id: 2d1a4e230705301139x30e36b68j7bfb56f3e0d44b20@mail.gmail.com
In Reply to: Re: [gentoo-user-br] Quais pacotes para programação? by Thiago Nunes
1 Obrigado!
2
3 O problema principal era que eu etava usando o gcc em vez do g++.
4
5 Bruno, obrigado por lembrar da questão de retirar o .h
6
7 Parece que a minha forma de programar está deprecated. eeh
8
9
10
11 Em 30/05/07, Thiago Nunes<thiago@×××××××××××××.br> escreveu:
12 > Marcus, você está usando o gcc ou o g++ pra compilar?
13 >
14 > Eu testei aqui e usando o gcc eu obtive o mesmo erro, mas usando o g++
15 > tudo funcionou normalmente.
16 >
17 > Observe:
18 >
19 > thiago@b4m7 /tmp $ cat teste3.c
20 > #include <iostream.h>
21 >
22 > int main(void){
23 > cout << "Olá mundo\n";
24 > return 0;
25 > }
26 > thiago@b4m7 /tmp $ gcc teste3.c
27 > teste3.c:1:22: iostream.h: Arquivo ou diretório não encontrado
28 > teste3.c: In function `main':
29 > teste3.c:4: error: `cout' undeclared (first use in this function)
30 > teste3.c:4: error: (Each undeclared identifier is reported only once
31 > teste3.c:4: error: for each function it appears in.)
32 > thiago@b4m7 /tmp $ g++ teste3.c
33 > In file included from
34 > /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3/backward/iostream.h:31,
35 > from teste3.c:1:
36 > /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3/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
37 > -Wno-deprecated.
38 > thiago@b4m7 /tmp $ ./a.out
39 > Olá mundo
40 >
41 > Observe também que o g++ está avisando que a iostream.h é uma
42 > biblioteca antiga e não deve mais ser usada, sendo substiutida pela
43 > iostream.
44 >
45 > Procure no google por "iostream or iostream.h", aparecerão várias
46 > leituras interessantes.
47 >
48 > --
49 > gentoo-user-br@g.o mailing list
50 >
51 >
52
53
54 --
55 Abraços,
56 Marcus Vinicius
57 Contato: (21) - 8179-1697 http://www.prosadigital.com
58
59 Analista/Desenvolvedor de sistemas Web ( UML, PHP, MySQL, W3C, Ajax, etc )
60 Consultoria em servidores Linux ( Iptables, Intranet, DNS, Apache,
61 Samba, FTP, SSH, Email, etc )
62 --
63 gentoo-user-br@g.o mailing list