From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QnV4D-0005TU-Ff for bitcoin-development@lists.sourceforge.net; Sun, 31 Jul 2011 12:24:25 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of bluematt.me designates 208.79.240.5 as permitted sender) client-ip=208.79.240.5; envelope-from=bitcoin-list@bluematt.me; helo=smtpauth.rollernet.us; Received: from smtpauth.rollernet.us ([208.79.240.5]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1QnV4C-0004HM-HF for bitcoin-development@lists.sourceforge.net; Sun, 31 Jul 2011 12:24:25 +0000 Received: from smtpauth.rollernet.us (localhost [127.0.0.1]) by smtpauth.rollernet.us (Postfix) with ESMTP id 4AC6F594123 for ; Sun, 31 Jul 2011 05:24:05 -0700 (PDT) Received: from mail.bluematt.me (unknown [IPv6:2001:470:9ff2:2:20c:29ff:fe16:f239]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: @bluematt.me) by smtpauth.rollernet.us (Postfix) with ESMTPSA for ; Sun, 31 Jul 2011 05:24:04 -0700 (PDT) Received: from [IPv6:2001:470:9ff2:1:2c0:caff:fe33:858b] (unknown [IPv6:2001:470:9ff2:1:2c0:caff:fe33:858b]) by mail.bluematt.me (Postfix) with ESMTPSA id 404AFA00 for ; Sun, 31 Jul 2011 14:24:15 +0200 (CEST) From: Matt Corallo To: bitcoin-development@lists.sourceforge.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Sun, 31 Jul 2011 14:24:10 +0200 Message-ID: <1312115050.2325.1.camel@Desktop666> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 7bit X-Rollernet-Abuse: Processed by Roller Network Mail Services. Contact abuse@rollernet.us to report violations. Abuse policy: http://rollernet.us/abuse.php X-Rollernet-Submit: Submit ID 502d.4e354964.e0585.0 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1QnV4C-0004HM-HF Subject: Re: [Bitcoin-development] Unit tests X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 12:24:25 -0000 On Sun, 2011-07-31 at 11:21 +0000, John Smith wrote: > > BTW, talking about the unit testframework: It doesn't build here by > default: > > $ make -f makefile.unix test_bitcoin USE_UPNP= > > g++ -static -o test_bitcoin obj/test/test_bitcoin.o -Wl,-Bstatic -l > boost_system -l boost_filesystem -l boost_program_options -l > boost_thread -l db_cxx -l ssl -l crypto -Wl,-Bdynamic -l gthread-2.0 > -l z -l dl -l pthread -lboost_unit_test_framework > /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In > function `_start': > (.text+0x20): undefined reference to `main' > collect2: ld returned 1 exit status > make: *** [test_bitcoin] Error 1 > > Two ways to fix this: > > 1) Add #define BOOST_TEST_DYN_LINK to the top of test_bitcoin.cpp. > This is needed for dynamic linking. > > 2) Link boost_unit_test_framework statically > > test_bitcoin: obj/test/test_bitcoin.o > $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -Wl,-Bstatic > -lboost_unit_test_framework -Wl,-Bdynamic > > (yes, it needs the switch to dynamic again at the end, otherwise > libgcc will be linked statically which results in an error ...) > > JS See pull 363 and 442 :) Matt