X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=oKxCvps0Z4mbKjYRjoiEmlkmEMJItfvm8Mp/R/F/zU9 uojvKOzKwmEUIj0aJe5mzpHD9DEvwMwo1ja/stiPIwC9Zb8h/IAQ3QQEPngIQe4B BrTk+J5FIakqeWfIrkW+MkuyIZD5jChsBdyduWeEsSSOMPD16b26JIkTNYnhd1z8 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=vOgfeniJ1mOsaOq8NWF6RHxtHd4=; b=RK9BCUVIRdYfbSJaj 3rGXQ28aoYLSm3XzrsN4rAfRjzp7V8tUSuDd/eMEGRKQbq+6MhN43cEq0HoqKbDT dQJzChLzi75oJnkKcxnKGdqknERk9elbUjparRw02lDl6O9LPXu9eixu/abI2zfx eO2CY8qniX9MHQh7gRNmYu2AoY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 X-Received: by 10.15.110.10 with SMTP id cg10mr16305275eeb.57.1372571935791; Sat, 29 Jun 2013 22:58:55 -0700 (PDT) Message-ID: <51CFC91B.7080104@gmail.com> Date: Sun, 30 Jun 2013 07:58:51 +0200 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: difficulty with c++ boost::thread (1.53.0) on Cygwin 1.7.20(0.266/5/3) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Il 6/30/2013 12:00 AM, Lewis Sternberg ha scritto: > > first off, I'm getting "cygcheck: Wrong architecture. Only ix86 > executables supported." when running cygcheck. > That said, ... > > The attached multithread.cpp ought to run as far as I can tell from > Cygwin, Boost, & the web. > (There is a posting from 2010 regarding problems with building > boost::thread on Cygwin, but I'm able to build, and anyway, the Cygwin > package already includes an up-to-date version of boost::thread. > > If I try to compile the attached code thus: > $ g++ -D THREADED multithread.cpp no libraries link instruction, so of course "undefined reference" > I get: > /tmp/ccpBRr49.o:multithread.cpp:(.text+0x259): undefined reference to > `boost::system::generic_category()' > /tmp/ccpBRr49.o:multithread.cpp:(.text+0x263): undefined reference to > `boost::system::generic_category()' > /tmp/ccpBRr49.o:multithread.cpp:(.text+0x26d): undefined reference to > `boost::system::system_category()' > /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: > /tmp/ccpBRr49.o: bad reloc address 0xb in > section`.text$_ZN5boost6system14error_categoryD1Ev[boost::system::error_category::~error_category()]' > collect2: ld returned 1 exit status > > If I add the option to load libbost_system (as suggested by some threads > on the web): > $ g++ -D THREADED -llibboost_system multithread.cpp on MS the linking order is important... $ g++ -D THREADED multithread.cpp -l boost_system-mt -l boost_thread-mt $ ./a.exe 0, 0, 0, 0 0, 3.93049e-06, 0, 0 > > thank you for your attention and (hopefully) help, > Lewis > Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple