Культурный офтопик
 help / color / mirror / Atom feed
* [room] Compile c++
@ 2005-10-28 16:59 Alexander
  2005-10-28 17:20 ` [room] " Alexander
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Alexander @ 2005-10-28 16:59 UTC (permalink / raw)
  To: культурный
	офтопик

Такая проблема:
[alex@localhost cpp]$ cat test.cpp
#include <iostream.h>

int main()
{
        return 0;
}

[alex@localhost cpp]$ gcc-3.3 test.cpp
In file included 
from /usr/include/c++/3.3.3/backward/iostream.h:31,
                 from test.cpp:1:
/usr/include/c++/3.3.3/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 <sstream> instead of the deprecated header 
<strstream.h>. To disable this warning use -Wno-deprecated.
/home/alex/tmp/cckOtq3k.o(.text+0x36): In function 
`__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/home/alex/tmp/cckOtq3k.o(.text+0x65): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]
()'
/home/alex/tmp/cckOtq3k.o(.eh_frame+0x11): undefined reference to 
`__gxx_personality_v0'
collect2: ld returned 1 exit status

может я что-то не понимаю, или что-то делаю не так, подскажите.
Вроде программа должна любым компилятором компилиться.
-- 
С уважением,
Alex


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

* [room] Re: Compile c++
  2005-10-28 16:59 [room] Compile c++ Alexander
@ 2005-10-28 17:20 ` Alexander
  2005-10-28 18:03 ` [room] " Alexey Rusakov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Alexander @ 2005-10-28 17:20 UTC (permalink / raw)
  To: культурный
	офтопик

> Такая проблема:
> [alex@localhost cpp]$ cat test.cpp
> #include <iostream.h>
>
> int main()
> {
>         return 0;
> }
>
> [alex@localhost cpp]$ gcc-3.3 test.cpp
> In file included
> from /usr/include/c++/3.3.3/backward/iostream.h:31,
>                  from test.cpp:1:
> /usr/include/c++/3.3.3/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 <sstream> instead of the
> deprecated header <strstream.h>. To disable this warning use
> -Wno-deprecated. /home/alex/tmp/cckOtq3k.o(.text+0x36): In
> function
>
> `__static_initialization_and_destruction_0(int, int)':
> : undefined reference to
> : `std::ios_base::Init::Init[in-charge]()'
>
> /home/alex/tmp/cckOtq3k.o(.text+0x65): In function `__tcf_0':
> : undefined reference to `std::ios_base::Init::~Init
> : [in-charge]
>
> ()'
> /home/alex/tmp/cckOtq3k.o(.eh_frame+0x11): undefined reference
> to `__gxx_personality_v0'
> collect2: ld returned 1 exit status
>
> может я что-то не понимаю, или что-то делаю не так,
> подскажите. Вроде программа должна любым компилятором
> компилиться.
вот еще доп. информация:
[alex@localhost cpp]$ gcc-3.3 -v
Reading specs from /usr/lib/gcc-lib/i586-alt-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib 
--with-slibdir=/lib --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --enable-long-long --enable-__cxa_atexit 
--enable-languages=c,c++,f77,objc,treelang,java,ada 
--program-suffix=-3.3 --enable-objc-gc --with-system-zlib 
--without-included-gettext --host=i586-alt-linux 
--build=i586-alt-linux --target=i586-alt-linux
Thread model: posix
gcc version 3.3.3 20040412 (ALT Linux, build 3.3.3-alt5)

-- 
С уважением,
Alex

mailto:rope-walker@yandex.ru - private;
mailto:admin@unixbeginner.com - site admin;
ICQ: 243647806


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

* Re: [room] Compile c++
  2005-10-28 16:59 [room] Compile c++ Alexander
  2005-10-28 17:20 ` [room] " Alexander
@ 2005-10-28 18:03 ` Alexey Rusakov
  2005-10-28 18:28   ` Alexey Rusakov
  2005-10-29  3:56 ` Vitaly Lipatov
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Alexey Rusakov @ 2005-10-28 18:03 UTC (permalink / raw)
  To: rope-walker,
	культурный
	офтопик

Alexander wrote:

>Такая проблема:
>[alex@localhost cpp]$ cat test.cpp
>#include <iostream.h>
>
>int main()
>{
>        return 0;
>}
>
>[alex@localhost cpp]$ gcc-3.3 test.cpp
>
[...skipped...]

>может я что-то не понимаю, или что-то делаю не так, подскажите.
>Вроде программа должна любым компилятором компилиться.
>  
>
Ваша программа должна компилироваться любым компилятором C++. Вы её 
пытаетесь компилировать компилятором C. Почувствуйте разницу.

-- 
  Alexey "Ktirf" Rusakov


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

* Re: [room] Compile c++
  2005-10-28 18:03 ` [room] " Alexey Rusakov
@ 2005-10-28 18:28   ` Alexey Rusakov
  0 siblings, 0 replies; 8+ messages in thread
From: Alexey Rusakov @ 2005-10-28 18:28 UTC (permalink / raw)
  To: культурный
	офтопик

Alexey Rusakov wrote:

>Alexander wrote:
>
>  
>
>>Такая проблема:
>>[alex@localhost cpp]$ cat test.cpp
>>#include <iostream.h>
>>
>>int main()
>>{
>>       return 0;
>>}
>>
>>[alex@localhost cpp]$ gcc-3.3 test.cpp
>>
>>    
>>
>[...skipped...]
>
>  
>
>>может я что-то не понимаю, или что-то делаю не так, подскажите.
>>Вроде программа должна любым компилятором компилиться.
>>    
>>
>Ваша программа должна компилироваться любым компилятором C++. Вы её 
>пытаетесь компилировать компилятором C. Почувствуйте разницу.
>  
>
http://faq.altlinux.ru/index.php?action=single&nf=1&qid=780

-- 
  Alexey "Ktirf" Rusakov


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

* Re: [room] Compile c++
  2005-10-28 16:59 [room] Compile c++ Alexander
  2005-10-28 17:20 ` [room] " Alexander
  2005-10-28 18:03 ` [room] " Alexey Rusakov
@ 2005-10-29  3:56 ` Vitaly Lipatov
  2005-10-29 14:25 ` Денис Смирнов
  2005-10-30 12:29 ` Александр Гвоздев
  4 siblings, 0 replies; 8+ messages in thread
From: Vitaly Lipatov @ 2005-10-29  3:56 UTC (permalink / raw)
  To: rope-walker,
	культурный
	офтопик

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

On Friday 28 October 2005 20:59, Alexander wrote:
> [alex@localhost cpp]$ gcc-3.3 test.cpp
...
> может я что-то не понимаю, или что-то делаю не так,
Если вы хотите, чтобы gcc понял, что это программа на C++,
используйте расширение .cc или .C

-- 
Lav
Виталий Липатов
Санкт-Петербург
GNU! ALT Linux Team! WINE! LaTeX! LyX! http://freesource.info

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: [room] Compile c++
  2005-10-28 16:59 [room] Compile c++ Alexander
                   ` (2 preceding siblings ...)
  2005-10-29  3:56 ` Vitaly Lipatov
@ 2005-10-29 14:25 ` Денис Смирнов
  2005-10-30 12:29 ` Александр Гвоздев
  4 siblings, 0 replies; 8+ messages in thread
From: Денис Смирнов @ 2005-10-29 14:25 UTC (permalink / raw)
  To: rope-walker,
	культурный
	офтопик

On Fri, Oct 28, 2005 at 07:59:13PM +0300, Alexander wrote:
 A> #include <iostream.h>

 A> int main()
 A> {
 A>         return 0;
 A> }
 A> [alex@localhost cpp]$ gcc-3.3 test.cpp

g++-3.3 test.cpp вас спасёт.

-- 
С уважением, Денис

http://freesource.info
----------------------------------------------------------------------------


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

* Re: [room] Compile c++
  2005-10-28 16:59 [room] Compile c++ Alexander
                   ` (3 preceding siblings ...)
  2005-10-29 14:25 ` Денис Смирнов
@ 2005-10-30 12:29 ` Александр Гвоздев
  2005-10-30 12:42   ` Andrey Rahmatullin
  4 siblings, 1 reply; 8+ messages in thread
From: Александр Гвоздев @ 2005-10-30 12:29 UTC (permalink / raw)
  To: rope-walker,
	культурный
	офтопик

В сообщении от 28 Октябрь 2005 20:59 Alexander написал(a):
> Такая проблема:
> [alex@localhost cpp]$ cat test.cpp
-> #include <iostream.h>
+#include <iostream>
>
> int main()
> {
>         return 0;
> }
gcc test.cpp -lstdc++

Всё работает! (tm)

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

* Re: [room] Compile c++
  2005-10-30 12:29 ` Александр Гвоздев
@ 2005-10-30 12:42   ` Andrey Rahmatullin
  0 siblings, 0 replies; 8+ messages in thread
From: Andrey Rahmatullin @ 2005-10-30 12:42 UTC (permalink / raw)
  To: smoke-room

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

On Sun, Oct 30, 2005 at 03:29:44PM +0300, Александр Гвоздев wrote:
> -> #include <iostream.h>
> +#include <iostream>
Необязательно.
> gcc test.cpp -lstdc++
Зачем? 
g++ test.cpp

-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(8):

Если я оставлю в Сизифе только то, чем сам пользуюсь, то получится Owl+.
Оно вам надо?
		-- ldv in devel@

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2005-10-30 12:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-28 16:59 [room] Compile c++ Alexander
2005-10-28 17:20 ` [room] " Alexander
2005-10-28 18:03 ` [room] " Alexey Rusakov
2005-10-28 18:28   ` Alexey Rusakov
2005-10-29  3:56 ` Vitaly Lipatov
2005-10-29 14:25 ` Денис Смирнов
2005-10-30 12:29 ` Александр Гвоздев
2005-10-30 12:42   ` Andrey Rahmatullin

Культурный офтопик

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/smoke-room/0 smoke-room/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 smoke-room smoke-room/ http://lore.altlinux.org/smoke-room \
		smoke-room@lists.altlinux.org smoke-room@lists.altlinux.ru smoke-room@lists.altlinux.com smoke-room@altlinux.ru smoke-room@altlinux.org smoke-room@altlinux.com
	public-inbox-index smoke-room

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.smoke-room


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git