From 17609cd98f2726cc82ddc61e79e609fee188803a Mon Sep 17 00:00:00 2001 From: Andy Teijelo Date: Wed, 20 Jul 2016 11:15:23 -0400 Subject: [PATCH] Using boost::regex, because g++ 4.8 doesn't have std::regex --- CMakeLists.txt | 2 +- main.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e509fc..02f9705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,4 +3,4 @@ cmake_minimum_required(VERSION 2.8) aux_source_directory(. SRC_LIST) add_executable(${PROJECT_NAME} ${SRC_LIST}) target_compile_options(${PROJECT_NAME} PRIVATE -g -std=c++11) -target_link_libraries(${PROJECT_NAME} poppler-cpp pthread boost_program_options) +target_link_libraries(${PROJECT_NAME} poppler-cpp pthread boost_program_options boost_regex) diff --git a/main.cpp b/main.cpp index 35ccb32..0e64a15 100644 --- a/main.cpp +++ b/main.cpp @@ -3,8 +3,8 @@ #include #include #include -#include +#include #include #include #include @@ -41,6 +41,9 @@ void render_pages(document *doc, int first, int last, int step, const string& fm bool validate_output(const string& output) { + using boost::regex; + using boost::sregex_iterator; + if (output.empty()) { cout << "Output format must be specified" << endl; return false;