From owner-freebsd-chat@FreeBSD.ORG Mon Oct 18 23:50:10 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47DF416A4CE for ; Mon, 18 Oct 2004 23:50:10 +0000 (GMT) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B17B43D31 for ; Mon, 18 Oct 2004 23:50:09 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: (qmail 13303 invoked by uid 207); 18 Oct 2004 23:50:07 -0000 Received: from keramida@freebsd.org by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.65):. Processed in 0.759375 secs); 18 Oct 2004 23:50:07 -0000 Received: from dialup65.ach.sch.gr (HELO gothmog.gr) ([81.186.70.65]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 18 Oct 2004 23:50:06 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i9INo2YK003382; Tue, 19 Oct 2004 02:50:02 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i9INo2ro003379; Tue, 19 Oct 2004 02:50:02 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Tue, 19 Oct 2004 02:50:01 +0300 From: Giorgos Keramidas To: Vulpes Velox Message-ID: <20041018235001.GA99564@gothmog.gr> References: <20041018184016.3dbed7b8@vixen42.24-119-122-191.cpe.cableone.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041018184016.3dbed7b8@vixen42.24-119-122-191.cpe.cableone.net> cc: chat@freebsd.org Subject: Re: learning c++ X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 23:50:10 -0000 On 2004-10-18 18:40, Vulpes Velox wrote: > Any one know of any good guides to learning C++, specifically in > regards to the newer gcc? > > Currently been messing with it a bit, but I am figuring that I am > doing something wrong... been messing with learning strings and the > like and I am getting a a.out that has a obscene size... 142kB in > size... Is your executable dynamically or statically linked? The following small C++ program builds into an a.out file of about 6 Kb, which is rather small -- certainly not hundreds of kilobytes. 1 #include 2 #include 3 4 using namespace std; 5 6 int 7 main(void) 8 { 9 cout << "Hello C++ world" << endl; 10 return (0); 11 } giorgos@gothmog[02:45]/home/giorgos$ c++ -W -Wall hello.cc giorgos@gothmog[02:46]/home/giorgos$ ls -l a.out -rwxrwxr-x 1 giorgos giorgos 6952 Oct 19 02:46 a.out giorgos@gothmog[02:46]/home/giorgos$ ./a.out Hello C++ world giorgos@gothmog[02:46]/home/giorgos$ ldd a.out a.out: libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x28075000) libm.so.3 => /lib/libm.so.3 (0x28147000) libc.so.6 => /lib/libc.so.6 (0x28161000)