This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: difficulty with c++ boost::thread (1.53.0) on Cygwin 1.7.20(0.266/5/3)


Thanks for the information about nm
We're both using the same g++ -- and presumably the same boost & cygwin.
I'm still at the same error.
... unless there are other suggestions, I guess I'll re-install cygwin
and hope for the best.

With gratitude,
Lewis


On Sun, Jun 30, 2013 at 10:43 AM, marco atzeri <marco.atzeri@gmail.com> wrote:
> 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
>

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]