From owner-freebsd-questions Mon Mar 9 15:53:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA04737 for freebsd-questions-outgoing; Mon, 9 Mar 1998 15:53:33 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from bsampley.vip.best.com (bsampley.vip.best.com [206.184.160.196]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA04536 for ; Mon, 9 Mar 1998 15:52:49 -0800 (PST) (envelope-from bsampley@best.com) Received: from localhost (localhost [127.0.0.1]) by bsampley.vip.best.com (8.8.8/8.8.7) with SMTP id PAA01785 for ; Mon, 9 Mar 1998 15:32:21 -0800 (PST) (envelope-from bsampley@best.com) Date: Mon, 9 Mar 1998 15:31:37 -0800 (PST) From: Burton Sampley X-Sender: bsampley@bsampley.vip.best.com Reply-To: Burton Sampley To: questions@FreeBSD.ORG Subject: GCC + object oriented prgm & FBSD Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----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