ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Andrey Rybak <ra@iop.kiev.ua>
To: community@altlinux.ru
Subject: [Comm] gcc & stl
Date: Mon, 30 May 2005 11:56:43 +0300
Message-ID: <429AD54B.4010508@iop.kiev.ua> (raw)

Hello, altLinux!
Подскажите, как с помощью gcc откомпилировать код с++, использующий stl.
Использую Сизиф.

Если взять простенький код (файл x.cpp), содержащий просто

#include <vector>
using namespace std;
int main()
{
    int a[4] = {10, 20, 30, 40};
   vector<int> v(a, a+4);
   return 0;
}

то gcc x.cpp говорит:

/home/andrey/tmp/ccMLeqL8.o(.text+0xc2): In function 
`__static_initialization_and_destruction_0(int, int)':
x.cpp: undefined reference to `std::ios_base::Init::Init[in-charge]()'
...
и т.д.

Подозреваю, что не знаю - какие ключи gcc использовать при компиляции - 
помогите пожалуйста.




             reply	other threads:[~2005-05-30  8:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30  8:56 Andrey Rybak [this message]
2005-05-30  9:09 ` Шайхутдинов Дамир
2005-05-30  9:15   ` Andrey Rybak
2005-05-30  9:24     ` Шайхутдинов Дамир
2005-05-30  9:25       ` Andrey Rybak
2005-05-30 10:19         ` Alexey Rusakov
2005-05-30 10:27           ` Andrey Rybak
2005-05-30 10:59             ` Alexey Rusakov
2005-05-30 10:29         ` Шайхутдинов Дамир
2005-05-30 10:35           ` Andrey Rybak
2005-05-30 10:51             ` Alexey I. Froloff
2005-05-30 10:56               ` Andrey Rybak
2005-05-30 14:25                 ` Andrey Rahmatullin
2005-05-30 11:05               ` Serge Polkovnikov
2005-05-30 12:27                 ` Vasya Makarov
2005-05-30 14:53                 ` Andrey Rahmatullin
2005-05-30 15:17                   ` Andrey Rahmatullin
2005-05-30 10:53             ` Шайхутдинов Дамир
2005-05-30 11:00               ` Andrey Rybak
2005-05-30 11:41                 ` Шайхутдинов Дамир
2005-05-30 11:04             ` Sergey Lebedev
2005-05-30 11:12               ` Andrey Rybak
2005-05-30 11:13             ` Vasya Makarov
2005-05-30 11:20             ` Andrew Borodin
2005-05-30 11:35           ` Boldin Pavel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=429AD54B.4010508@iop.kiev.ua \
    --to=ra@iop.kiev.ua \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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