tags:

views:

26

answers:

0

I've been working a couple of small c++ projects using the nuwen.net minGW distro and I've run into a problem trying to link against the boost::filesystem library. I am invoking g++ like this:

g++ -g -Wall -pedantic -std=c++0x -static-libgcc -o main.exe main.cpp -lmingw32 -lstdc++ -lboost_system -lboost_filesystem

However, this results in a linker error

/mingw/lib/libboost_system.a(error_code.o):error_code.cpp:(.text+0x15f): undefin
ed reference to `_Unwind_Resume'
/mingw/lib/libboost_system.a(error_code.o):error_code.cpp:(.text+0x354): undefin
ed reference to `_Unwind_Resume'
/mingw/lib/libboost_system.a(error_code.o):error_code.cpp:(.eh_frame+0x12): unde
fined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

This previous question had a problem with using versions of the library that were compiled with different versions of gcc. However, I don't know if that is the problem here, as all of the packages in the newest version of the nuwen.net distro were compiled with gcc 4.5.