내 프로젝트에서 Boost의 이전 버전 인 iostreams w/bzip2를 사용하고있었습니다. 지금 부스트 1.51로 업그레이드하려고합니다. 처음에는 bzip으로 컴파일하지 않았으므로 분명히 libboost_bzip2-vc100-mt-sgd-1_51.lib에 대한 링커가 없어졌습니다. 그 다음 these instructions을 따라 (정적 플래그를 추가하여)이 파일을 컴파일했습니다.bzip으로 풀린 iostream - 확인되지 않은 기호
>error LNK2001: unresolved external symbol "protected: __thiscall boost::iostreams::detail::bzip2_base::~bzip2_base(void)" ([email protected]@[email protected]@@[email protected])
>error LNK2001: unresolved external symbol "protected: __thiscall boost::iostreams::detail::bzip2_base::bzip2_base(struct boost::iostreams::bzip2_params const &)" ([email protected]@[email protected]@@[email protected][email protected]@@Z)
>error LNK2001: unresolved external symbol "int const boost::iostreams::bzip2::stream_end" ([email protected]@[email protected]@@3HB)
...
어떤 아이디어가 LIB이 모든 코드를 포함하지 않는 방법 제공 :
그러나, 지금 링커를 실행하는없는 문자의 무리를 반환? 내가 뭘 놓치고 있니? Windows에서 VS2010을 사용하고 있습니다.
편집 : 알았습니다!
libboost_iostreams-vc100-mt-sgd-1_51.lib의 이전 버전에 bzip없이 컴파일되었습니다. 내가 아직 확실하지 않다 것은 이것이다 : 내 원래의 편집을 위해 내가 사용 :
>b2 --with-iostreams -sBZIP2_SOURCE=D:\Work\external\bzip2-1.0.6 -sZLIB_SOURCE=d:\work\external\zlib-1.2.3 runtime-link=static
이것은 다음과 같은 파일 제작 : (문제를 해결하는)은 "올바른"편집에
libboost_bzip2-vc100-mt-s-1_51.lib
libboost_bzip2-vc100-mt-sgd-1_51.lib
을 나는 다음을 사용했다 :
>b2 --with-iostreams -sBZIP2_SOURCE=D:\Work\external\bzip2-1.0.6 runtime-link=static
e 그것은 단순히 불필요한 zlib을 제거했습니다. 제작 :
libboost_bzip2-vc100-mt-s-1_51.lib
libboost_bzip2-vc100-mt-sgd-1_51.lib
libboost_iostreams-vc100-mt-s-1_51.lib
libboost_iostreams-vc100-mt-sgd-1_51.lib
어떻게 iostreams 라이브러리가 원본 컴파일에서 생성되지 않았습니까? 매우 이상합니다.
감사합니다. 에서
해결책으로 질문을 편집하는 대신 적절한 답으로 입력하고 동의하십시오. –
시도해 보았습니다.하지만 조금 전에 등록한 것 같아서 제 자신의 질문에 대답하기에 충분한 평판이 없습니다 ... –
@ E.K. 더 많은 StackOverflow 사이트에 로그인하여 명성을 높여보십시오. –