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=X+0MWcFCh0lLjesGgvZ5KGt7bEGCP6HSUQLLORMo8i8 IcJqGXmdu0FeuQYbh1ARlUoZpj9DiMYkBw82sX7Qtqxyw8DxGOlQYpMZNw0OiLMc 2SKB/3BwwbmnZbHrJOinj6sIMQXmBe8670dadMYQNmECLWZPq51bDqpy+GS6udW4 = 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=0CD2pgwhjXeKwnkgkHQZNuVFEJQ=; b=CEZmDpmTBZL6mcTTG jQT/cdeFhGNKIzdKiSLQbME5T8F7wSlzjfSANQdTMztP9e+Dh7WEslxSDBfZNOo7 lAJCOt6zUsaoKBzXntEYwmqE5aA/8WBONO/tSqr4MBv9rA0P9JQlwmt/+eSjVCc0 CG1fi44tCn/yUw4DzLgRsCA2eE= 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.205.35.13 with SMTP id su13mr2739539bkb.71.1372614232646; Sun, 30 Jun 2013 10:43:52 -0700 (PDT) Message-ID: <51D06E54.80901@gmail.com> Date: Sun, 30 Jun 2013 19:43:48 +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: <51CFC91B DOT 7080104 AT gmail DOT com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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