어제까지 내 프로그램이 올바르게 컴파일되고 연결되었습니다. 오늘부터 동일한 프로그램 (동일한 출처와 동일한 환경)은 연결되지 않습니다. 부스트 라이브러리를 찾을 수 없습니다. CMakeLists.txt 파일의Cmake가 더 이상 부스트를 찾을 수 없습니다.
위 :
...
find_package (Boost REQUIRED)
set (Boost_USE_STATIC_LIBS ON)
set (Boost_USE_MULTITHREADED OFF)
set (Boost_USE_STATIC_RUNTIME OFF)
find_package (Boost COMPONENTS program_options)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif()
...
실행 cmake :
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=ON ../NumberPuncher/
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.49.0
-- Could NOT find Boost
-- Configuring done
-- Generating done
-- Build files have been written to: /SWEnvironment/sw/NumberPuncher_prj/Release
라인 :
- 부스트 버전 : 1.49.0
잘못이다, Boost를 설치 한 이후 1.54.0입니다. 그러나 CMakeLists.txt 파일에서 부스트 버전은 지정되지 않았으므로 필요하지 않습니다.
entrypoint.cpp:(.text.startup+0x6be): undefined reference to `boost::program_options::options_description::add_options()'
는 처음에는이 제거 된 부스트가 들어있는 디렉토리를 생각하지만, 아직 거기 : 프로그램을 구축
는,이 종류의 부스트를 기준으로 링크 오류를 얻을.
나는 cmake를 재실행하지만 클린 빌드를 만들었지 만 문제는 남아 있습니다.
아이디어가 있으십니까?
환경 :
리눅스 오픈 수세 12.2
GCC/G ++ 4.7.1
부스트 1.54.0