diff --git a/tests/datarule.cpp b/tests/datarule.cpp
index 6a91c82ea5f4135a2dea0dfda80cdec65333c74a..33394c2cec1ff4ef70bd5ddd38bd2eb5a007c717 100644
--- a/tests/datarule.cpp
+++ b/tests/datarule.cpp
@@ -77,7 +77,7 @@ boost::shared_ptr<Corpus2::Chunk> get_corpus(const std::string& path, const Corp
 	} else {
 		boost::shared_ptr<Corpus2::Chunk> chunk;
 		boost::filesystem::path fp(path);
-		std::string fn = fp.filename();
+		std::string fn = fp.filename().c_str();
 		if (fn.find("ccl") == fn.npos) {
 			Corpus2::XcesReader xr(tagset, path);
 			chunk = xr.get_next_chunk();
@@ -168,7 +168,7 @@ void test_one_rule_item_actual(const rule_compare_test& c)
 		BOOST_ERROR("Empty chunk loaded");
 	}
 	boost::shared_ptr<Corpus2::TokenReader> reader;
-	std::string ofn = c.output_corpus.filename();
+	std::string ofn = c.output_corpus.filename().c_str();
 	if (ofn.find("ccl") != ofn.npos || ofn.find("match") != ofn.npos) {
 		reader = Corpus2::TokenReader::create_path_reader("ccl", tagset, c.output_corpus.string());
 	} else {
@@ -229,11 +229,11 @@ int init_subdir(const path& dir, std::string ps, std::vector<rule_compare_test>&
 			if (itr->path().extension() == ".ccl") {
 				txt_tests.insert(itr->path());
 			} else if (itr->path().extension() == ".xml") {
-				if (!boost::algorithm::ends_with(itr->path().stem(), ".out")) {
+				if (!boost::algorithm::ends_with(itr->path().stem().c_str(), ".out")) {
 					status.input = itr->path();
 				}
 			} else if (itr->path().extension() == ".is-the-tagset") {
-				status.tagset = itr->path().stem();
+				status.tagset = itr->path().stem().c_str();
 			}
 		}
 	}
diff --git a/wccl-apps/wccl-rules.cpp b/wccl-apps/wccl-rules.cpp
index a3977f1646b8eb7d3f8915af6555409b7fbe6fe2..c67bf10c248453cbccac1f1b1c2d95566a3c4fff 100644
--- a/wccl-apps/wccl-rules.cpp
+++ b/wccl-apps/wccl-rules.cpp
@@ -111,7 +111,7 @@ std::pair<int,int> RuleRunner::load_more_rules(const std::string& filename)
 		parsed_file = parser_.parseWcclFile(is, search_path_);
 		if (parsed_file) {
 			boost::filesystem::path p(filename);
-			file_names_.push_back(p.stem());
+			file_names_.push_back(p.stem().c_str());
 			size_t match_rules = 0, tag_rules = 0;
 			if (parsed_file->has_tag_rules()) {
 				tag_rules = parsed_file->get_tag_rules().size();