2017-01-14 1 views
0

나는 cl 19 (visual studio 2015)로 1.61.0을 사용합니다. 명령 줄 bootstrap.\b2을 사용하여 시작 설명서를 얻는 대신 라이브러리를 향상 시켰습니다. 이것은 몇 가지 vc14 접두사 라이브러리가있는 무대 디렉토리를 만들었습니다.cl 19의 정규 표현식 링커 오류입니다.

내가이 명령 줄 컴파일러 설정

#include <boost/regex.hpp> 
#include <iostream> 
#include <string> 

int main() 
{ 
    std::string line; 
    boost::regex pat("^Subject: (Re: |Aw:)*(.*)"); 

    while (std::cin) 
    { 
     std::getline(std::cin, line); 
     boost::smatch matches; 
     if (boost::regex_match(line, matches, pat)) 
      std::cout << matches[2] << std::endl; 
    } 
} 

시작 정규식 프로그램을 받고 컴파일을 시도 때 :

cl main.cpp -I %BOOST_ROOT% -L %BOOST_LIB_14% /EHsc 

내가 얻을이 오류를 :

Link:: fatal error LNK1181: cannot open input file 'C:\local\boost_1_61_0\stage\lib.obj 

어떤 문제가 내 시도로?

편집는 :

cl main.cpp /I %BOOST_ROOT% /link /LIBPATH:%BOOST_LIB_14% /EHsc 

지금, 나는이 오류가 :

LINK: fatal error LNK1104: cannot open file 'libbosst_regex-vc140-mt-s-1_61.lib' 

답변

0

내가 해결책을 발견 나는 명령 줄에 컴파일 변경되었습니다.

나는 bootstrap.\b2 명령으로 부스트 라이브러리를 만들었습니다. mt (멀티 스레드) 및 gd (디버그) 라이브러리 만 작성했습니다.

정적 링크 ( s) 라이브러리의 경우 내가 .\b2 runtime-link=static 시도하고 BUIT 'libbosst_regex-vc140-MT-S-1_61.lib'파일 지금은 모든 것이 OK입니다.

나는이 점을 what's the difference between mt-gd and mt-s library에 발견했다.