2012-09-05 5 views
1

다른 프로젝트에서 많은 부분을 사용합니다. 나는 boost asio로 실험하고 싶지만 첫 단계에서 실패하고있다. 최소한의 코드를 감안할 때. . 당신은 또한 libboost_system을 연결해야하므로처음으로 boost :: asio를 사용할 때 빌드 오류가 발생했습니다.

#include <boost/asio.hpp> 

int main() 
{ 
    return 0; 
} 

가와

clear; g++ client.cpp -I/path_to_boost/ -o clientapp

와 Mac에서 컴파일 나는

Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from: __static_initialization_and_destruction_0(int, int)in ccLQRfXY.o boost::asio::error::get_system_category() in ccLQRfXY.o boost::system::error_code::error_code()in ccLQRfXY.o "boost::system::generic_category()", referenced from: __static_initialization_and_destruction_0(int, int)in ccLQRfXY.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status

답변

1

Boost.Asio가 Boost.System에 따라 달라집니다 오류가 발생합니다.

관련 문제