Культурный офтопик
 help / color / mirror / Atom feed
From: Alexander <rope-walker@yandex.ru>
To: "культурный офтопик" <smoke-room@lists.altlinux.org>
Subject: [room] Compile C++
Date: Sat, 29 Oct 2005 11:38:27 +0300
Message-ID: <200510291138.27280.rope-walker@yandex.ru> (raw)

Пытаюсь откомпилировать такое:
конструктор класса:
 echo_class::echo_class(int, int, int) {}

кусок программы:
 ...
 int main()
 {
 echo_class * process;
 process = new echo_class (6, 1, 0);
 ...

Уже по все книжкам посмотрел - все ормально, написано все 
правильно, но при компиляции выдает вот такое:
[alex@localhost echo_test1]$ g++ echo_test.cpp
/home/alex/tmp/cceu4j9X.o(.text+0x33): In function `main':
: undefined reference to `echo_class::echo_class[in-charge](int, 
int, int)'
collect2: ld returned 1 exit status

В чем проблема? Под винду компилировалось нормально, и не 
выдавало никаких ошибок.

[alex@localhost echo_test1]$ g++ -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

             reply	other threads:[~2005-10-29  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29  8:38 Alexander [this message]
2005-10-29 11:24 ` Alexey Rusakov
2005-10-29 17:37   ` Michael Holzman
2005-10-29 18:33     ` Alexander

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=200510291138.27280.rope-walker@yandex.ru \
    --to=rope-walker@yandex.ru \
    --cc=smoke-room@lists.altlinux.org \
    /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

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

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