I am trying to compile a boost.asio example, but I get the following linker errors: "undefined reference to _Unwind_Resume'" and "undefined reference to
__gxx_personality_v0'". I've been searching google for a long time, but nothing helped. Which library do I need to link? Thanks in advance!
views:
263answers:
2
A:
You're probably using gcc
to link your program. If you use g++
instead it will link in the required libraries.
For Dev-C++, see FAQ entry: Dev-C++ uses gcc instead of g++ for linking
interjay
2010-01-09 14:12:59
I read that somewhere, but how do I change the compiler in DevC++? (I forgot to mention, I use that program)
Levo
2010-01-09 14:15:10
My project is A c++ project already.
Levo
2010-01-09 14:33:15
A:
Works like a charm on Ubuntu 9.10:
$ g++ -o chat_server -c chat_server.cpp
In file included from chat_server.cpp:21:
chat_message.hpp: In member function ‘void chat_message::encode_header()’:
chat_message.hpp:84: warning: format ‘%4d’ expects type ‘int’, \
but argument 3 has type ‘size_t’
$ ls -l chat_server*
-rw-r--r-- 1 edd edd 1233608 2010-01-09 08:17 chat_server
-rw-r--r-- 1 edd edd 6244 2010-01-09 08:17 chat_server.cpp
$
Dirk Eddelbuettel
2010-01-09 14:20:00
I haven't tested it yet, the new kernel doesn't work with the custom display driver.... I'll test it as soon as I fix it.
Levo
2010-01-09 14:32:05
Huh? The kernel and display have nothing to do with your use of g++. I simply pointed out to you that the Boost example builds fine. If you have different header locations, you may need a -I.
Dirk Eddelbuettel
2010-01-09 15:16:35
Can you speak up a little? I can't hear you among all the screaming.
Dirk Eddelbuettel
2010-01-09 16:05:56