2013-02-19 46 views
0

我在Windows XP SP3上使用codeblocks 10.05 mingw,我正在嘗試構建boost asio client ssl example。我嘗試使用以下庫來編譯文件以及鏈接器設置。升壓asio ssl客戶端生成錯誤?

libwsock32.a from the mingw lib 
    libws2_32.a from the mingw lib 
    libboost_system-mgw44-d-1_52.a this is what I built myself using mingw, the same version. I did this by using boost jam [http://theseekersquill.wordpress.com/2010/08/24/howto-boost-mingw/][2]. 

I got the next four libs from libcurl curl-7.28.1-devel-mingw32 

    libcrypto.a 
    libcrypto.dll.a 
    libssl.a 
    libssl.dll.a 

    and the following are my linker settings: 

    -lboost_system 
    -lcrypto 
    -lssl 

和下面的是鏈接錯誤:

\mingw\lib\libboost_system.a(error_code.o):error_code.cpp|| undefined reference to `_Unwind_Resume'| 
\mingw\lib\libboost_system.a(error_code.o):error_code.cpp|| undefined reference to `_Unwind_Resume'| 
\mingw\lib\libboost_system.a(error_code.o):error_code.cpp|| undefined reference to `_Unwind_Resume'| 
\mingw\lib\libboost_system.a(error_code.o):error_code.cpp:(.eh_frame+0xa3)||undefined reference to `__gxx_personality_v0'| 
||=== Build finished: 4 errors, 0 warnings ===| 

什麼我不知道爲什麼就是不提高包括這個或MinGW的SSL庫的這一事實,是有一些方法來解決這個?我知道有兩種類型的mingw目標代碼SJLJ和DW2,可能是這個原因,但我不確定。

這是我想通了,什麼是錯誤的鏈接libcurl curl-7.28.1-devel-mingw32

回答

1

。我將-lboost_system-mgw44-d-1_52.a文件放到mingw/lib文件夾中,並與--lboost_system-mgw44-d-1_52而不是--libboost_system鏈接,將所需的DLL放到項目文件夾中。解決了!