From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 643 invoked by alias); 30 Jun 2013 17:44:01 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 610 invoked by uid 89); 30 Jun 2013 17:43:56 -0000 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 Received: from mail-bk0-f51.google.com (HELO mail-bk0-f51.google.com) (209.85.214.51) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 30 Jun 2013 17:43:54 +0000 Received: by mail-bk0-f51.google.com with SMTP id ji1so1363617bkc.38 for ; Sun, 30 Jun 2013 10:43:52 -0700 (PDT) X-Received: by 10.205.35.13 with SMTP id su13mr2739539bkb.71.1372614232646; Sun, 30 Jun 2013 10:43:52 -0700 (PDT) Received: from [192.168.0.194] (93-33-100-223.ip44.fastwebnet.it. [93.33.100.223]) by mx.google.com with ESMTPSA id ps10sm6853255bkb.14.2013.06.30.10.43.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Jun 2013 10:43:51 -0700 (PDT) Message-ID: <51D06E54.80901@gmail.com> Date: Sun, 30 Jun 2013 21:45:00 -0000 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@cygwin.com Subject: Re: difficulty with c++ boost::thread (1.53.0) on Cygwin 1.7.20(0.266/5/3) References: <51CFC91B.7080104@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00762.txt.bz2 Il 6/30/2013 6:31 PM, Lewis S ha scritto: > Thanks Marco! > > I now get complaints about start_thread_noexcept: > > $ g++ -D THREADED multithread.cpp -l boost_system-mt -l boost_thread-mt it works on my system, with $ g++ --version g++ (GCC) 4.5.3 > /tmp/ccfP6V1v.o:multithread.cpp:(.text$_ZN5boost6thread12start_threadEv[boost::thread::start_thread()]+0xe): > undefined reference to `boost::thread::start_thread_noexcept()' > collect2: ld returned 1 exit status > > Can you (or anyone) tell me how to go from the "undefined reference" > error to the name of the library to be loaded? $ nm /usr/lib/libboost_thread-mt.dll.a |grep start_thread 00000000 I __imp___ZN5boost6thread12start_threadEv 00000000 T __ZN5boost6thread12start_threadEv 00000000 I __imp___ZN5boost6thread12start_threadERKNS_17thread_attributesE 00000000 T __ZN5boost6thread12start_threadERKNS_17thread_attributesE > Do the -l argument themselves require an order? If so, how do I learn > the required ordering (w/o trial&error) -l requires an order if one library depends on a following one. For your case both ways work g++ -D THREADED multithread.cpp -l boost_thread-mt -l boost_system-mt as there is no dependency between them > > With gratitude, > Lewis > > -- 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