From 7b9a9590c199a67565c6d341168d016984aae4e6 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Tue, 17 Jan 2012 01:17:08 +0200 Subject: [PATCH] Fix compiling on win32 Turns out the value of .native() can't be put into std::string. Also provode way to link against boost_thread --- Makefile | 6 +++++- src/core/moviedata.cpp | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9202ab92..247bdb03 100644 --- a/Makefile +++ b/Makefile @@ -47,12 +47,16 @@ CFLAGS += -DSTD_THREADS else ifeq ($(THREADS), BOOST) CFLAGS += -DBOOST_THREADS +ifdef BOOST_THREAD_LIB +LDFLAGS += -l$(BOOST_THREAD_LIB) +else LDFLAGS += -lboost_thread-mt +endif else ifeq ($(THREADS), NO) CFLAGS += -DNO_THREADS else -$(error "Bad value for THREADS (expected YES, BOOST or NO)") +$(error "Bad value for THREADS (expected YES, BOOST, BOOSTNOMT or NO)") endif endif endif diff --git a/src/core/moviedata.cpp b/src/core/moviedata.cpp index aba6bdff..4a18bd1b 100644 --- a/src/core/moviedata.cpp +++ b/src/core/moviedata.cpp @@ -214,7 +214,7 @@ void do_save_state(const std::string& filename) throw(std::bad_alloc, messages << "Save failed: " << e.what() << std::endl; lua_callback_err_save(filename2); } - last_save = boost::filesystem3::absolute(boost::filesystem3::path(filename2)).native(); + last_save = boost::filesystem3::absolute(boost::filesystem3::path(filename2)).string(); } //Save movie. @@ -236,7 +236,7 @@ void do_save_movie(const std::string& filename) throw(std::bad_alloc, std::runti messages << "Save failed: " << e.what() << std::endl; lua_callback_err_save(filename2); } - last_save = boost::filesystem3::absolute(boost::filesystem3::path(filename2)).native(); + last_save = boost::filesystem3::absolute(boost::filesystem3::path(filename2)).string(); } extern time_t random_seed_value; -- 2.11.4.GIT