|
Boost Users : |
Subject: Re: [Boost-users] Error '__Unwind_Resume' when trying to link codeblocks to boost::thread
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-01-13 21:07:51
Bruno,
The symbols it's looking for are should be in your implementation's
C++ runtime library. Typically the kind of error you cite is caused
by using gcc instead of g++ to do the linking step, though I'm a bit
surprised not to see similar errors reported about iostream support.
The only other thought I have is that maybe codeblocks is actually
using a different compiler than the one you used to build
Boost.Threads.
At Thu, 13 Jan 2011 23:18:10 -0200,
Bruno Ferraz do Amaral wrote:
>
> Hello Simon,
>
> thanks for the answer and suggestion.
>
> My IDE is CodeBlocks, and I'm running it over Windows Vista 32.
>
> My code is a simple example of the thread lib use:
>
> Code:
>
> #include <boost/thread/thread.hpp>
> #include <iostream>
>
> using namespace std;
>
> void hello_world()
> {
> cout << "Hello world, I'm a thread!" << endl;
> }
>
> int main(int argc, char* argv[])
> {
> // inicialize a new thread
> boost::thread my_thread( &hello_world );
> // wait for the thread end
> my_thread.join();
>
> return 0;
> }
>
>
> It's very simple, and when I try to compile it, I got these errors:
>
> C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0x7d)||undefined
> reference to `__Unwind_Resume'|
> C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0x66f)||undefined
> reference to `__Unwind_Resume'|
> C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0x771)||undefined
> reference to `__Unwind_Resume'|
> C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0xdbe)||undefined
> reference to `__Unwind_Resume'|
> C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0xe53)||undefined
> reference to `__Unwind_Resume'|
> C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.eh_frame+0x12)||undefined
> reference to `___gxx_personality_v0'|
> ||=== Build finished: 6 errors, 0 warnings ===|
>
> CodeBlocks uses MinGW as compiler, and due this is a C++ code, the g++ is
> been used (I guess).
>
> note: I've built the boost using MinGW, not msvc.
>
> 2011/1/13 Simon Mpasi <smpasi_at_[hidden]>
>
> > Hello Bruno,
> >
> >
> >
> > I have used boost libraries and they work for me on Windows. To better
> > understand your question,
> >
> > You may want to tell which environment you r are using, i.e. VC9, Windows
> > XP, â¦, and including a copy of the code that is failing may help also.
> >
> >
> >
> > Cheers,
> >
> > Simon
> >
> >
> >
> > *From:* boost-users-bounces_at_[hidden] [mailto:
> > boost-users-bounces_at_[hidden]] *On Behalf Of *Bruno Ferraz do Amaral
> > *Sent:* Wednesday, January 12, 2011 9:11 PM
> > *To:* boost-users_at_[hidden]
> > *Subject:* [Boost-users] Error '__Unwind_Resume' when trying to link
> > codeblocks to boost::thread
> >
> >
> >
> > Hi,
> >
> > I'm a new user of Boost Libraries, and I'd use multithreading linking the
> > boost::thread class into my projetct.
> >
> > I'm using Code::Blocks, and I've built the Boost in Windows, and then
> > I followed a wiki guide to link the libraries of the Boost.Thread with my
> > Project in CodeBlocks.
> >
> > However I found this reference errors:
> >
> > C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0x7d)||undefined
> > reference to `__Unwind_Resume'|
> > C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0x66f)||undefined
> > reference to `__Unwind_Resume'|
> > C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0x771)||undefined
> > reference to `__Unwind_Resume'|
> > C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0xdbe)||undefined
> > reference to `__Unwind_Resume'|
> > C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.text+0xe53)||undefined
> > reference to `__Unwind_Resume'|
> > C:\boost_1_45_0\stage\lib\libboost_thread-mgw45-mt-1_45.a(thread.o):thread.cpp:(.eh_frame+0x12)||undefined
> > reference to `___gxx_personality_v0'|
> > ||=== Build finished: 6 errors, 0 warnings ===|
> >
> > What I have to do? I tried a lot of tutorials and guides in Google, but no
> > one works...
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
>
>
>
> --
> ================================
> Bruno Ferraz do Amaral
> Ciências da Computação - ICMC
> Universidade de São Paulo - USP São Carlos
> =================================
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net