Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 1998 15:31:37 -0800 (PST)
From:      Burton Sampley <bsampley@best.com>
To:        questions@FreeBSD.ORG
Subject:   GCC + object oriented prgm & FBSD
Message-ID:  <Pine.BSF.3.96.980309134631.1102A-100000@bsampley.vip.best.com>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----

Greetings,

I need some help trying to compile my first object-oriented program using
multiple files in C++ on FreeBSD.  What syntax would make g++ happy?
GCC/G++ keep puking when I try to compile the "main" program with all of
the function calls to functions defined for the class as undefined
symbols.  Here's the output from my most recent attempt with my code:

bsampley(123)% g++ strcomp.C
/var/tmp/cc0017691.o: Undefined symbol `_get_data__11comparetypePc'
referenced from text segment
/var/tmp/cc0017691.o: Undefined symbol `_compare__11comparetype'
referenced from text segment
/var/tmp/cc0017691.o: Undefined symbol `_output__11comparetypePc'
referenced from text segment
bsampley(124)% 


What I have tried:

1.  Quickly searched through /usr/src/ looking for a good example of a C++
program split into severals files.  I couldn't locate one.

2.  RTFM'ed the man pages for GCC/G++.  I'll try this again, it has to be
in there somewhere.

3.  Typed my professor's example program (all three files) kept getting
the same error I get with my code.

4.  Tried the list.

Thanks in advance for any help.

- -burton-

- ---------------

Burton Sampley
bsampley@best.com or bsampley@haywire.csuhayward.edu
PGP key available at http://www.best.com/~bsampley/pgp.html 



-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNQR75Xt2O8KJtMdBAQHAFgQAocJmbvaTJDA5kwD1L2hchLACbfjEuIGt
zv1Ai9C6jQxA6RZs9Gn6y/a1efCg0hhUmNlivsn6xLyg0RPIQBcF1ShH70WVjFW/
NGspEzxoZUEgmL9kmm3jEBqy7RmnXRjZqXmnkLMrvooe3uV0DXEwBPkFU0Sm6RWs
0XnzRj6Mh8c=
=APMB
-----END PGP SIGNATURE-----


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980309134631.1102A-100000>