Index: /code/branches/kicklib/src/OrxonoxConfig.h.in
===================================================================
--- /code/branches/kicklib/src/OrxonoxConfig.h.in	(revision 8224)
+++ /code/branches/kicklib/src/OrxonoxConfig.h.in	(revision 8225)
@@ -228,3 +228,13 @@
 }
 
+// Define Boost Filesystem version
+#include <boost/version.hpp>
+#ifndef BOOST_FILESYSTEM_VERSION
+#  if (BOOST_VERSION < 104600)
+#    define BOOST_FILESYSTEM_VERSION 2
+#  else
+#    define BOOST_FILESYSTEM_VERSION 3
+#  endif
+#endif
+
 #endif /* _OrxonoxConfig_H__ */
Index: /code/branches/kicklib/src/libraries/core/CorePrereqs.h
===================================================================
--- /code/branches/kicklib/src/libraries/core/CorePrereqs.h	(revision 8224)
+++ /code/branches/kicklib/src/libraries/core/CorePrereqs.h	(revision 8225)
@@ -261,5 +261,6 @@
 namespace boost
 {
-#if BOOST_VERSION < 104400
+#if (BOOST_VERSION < 104400)
+
     namespace filesystem
     {
@@ -268,5 +269,8 @@
         typedef basic_path<std::string, path_traits> path;
     }
-#elif BOOST_VERSION < 104600
+
+#elif (BOOST_VERSION < 104800)
+
+# if BOOST_FILESYSTEM_VERSION == 2
     namespace filesystem2
     {
@@ -281,5 +285,5 @@
         using filesystem2::path;
     }
-#else
+# elif BOOST_FILESYSTEM_VERSION == 3
     namespace filesystem3
     {
@@ -290,5 +294,16 @@
         using filesystem3::path;
     }
+# endif
+
+#elif
+
+    // TODO: Check this once boost 1.48 is released
+    namespace filesystem
+    {
+        class path;
+    }
+
 #endif
+
     class thread;
     class mutex;
Index: /code/branches/kicklib/src/libraries/core/GraphicsManager.cc
===================================================================
--- /code/branches/kicklib/src/libraries/core/GraphicsManager.cc	(revision 8224)
+++ /code/branches/kicklib/src/libraries/core/GraphicsManager.cc	(revision 8225)
@@ -61,4 +61,11 @@
 #include "command/ConsoleCommand.h"
 
+// Differentiate Boost Filesystem v2 and v3
+#if (BOOST_FILESYSTEM_VERSION < 3)
+#  define BF_NATIVE_STRING file_string
+#else
+#  define BF_NATIVE_STRING string
+#endif
+
 namespace orxonox
 {
@@ -243,9 +250,5 @@
         // Use backslash paths on Windows! file_string() already does that though.
         for (unsigned int i = 0; i < plugins.size(); ++i)
-#if BOOST_FILESYSTEM_VERSION < 3
-            ogreRoot_->loadPlugin((folder / plugins[i]).file_string());
-#else
-            ogreRoot_->loadPlugin((folder / plugins[i]).string());
-#endif
+            ogreRoot_->loadPlugin((folder / plugins[i]).BF_NATIVE_STRING());
     }
 
Index: /code/branches/kicklib/src/libraries/core/PathConfig.cc
===================================================================
--- /code/branches/kicklib/src/libraries/core/PathConfig.cc	(revision 8224)
+++ /code/branches/kicklib/src/libraries/core/PathConfig.cc	(revision 8225)
@@ -33,5 +33,4 @@
 #include <cstdio>
 #include <vector>
-#include <boost/version.hpp>
 #include <boost/filesystem.hpp>
 
@@ -56,11 +55,13 @@
 #include "CommandLineParser.h"
 
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-#  define BOOST_LEAF_FUNCTION filename
-#elif (BOOST_FILESYSTEM_VERSION < 3)
-#  define BOOST_LEAF_FUNCTION leaf
+// Differentiate Boost Filesystem v2 and v3
+#if (BOOST_FILESYSTEM_VERSION < 3)
+#  define BF_LEAF leaf
+#  define BF_GENERIC_STRING string
+#  define BF_NATIVE_STRING file_string
 #else
-#  define BOOST_LEAF_FUNCTION path().filename().string
+#  define BF_LEAF path().filename().string
+#  define BF_GENERIC_STRING generic_string
+#  define BF_NATIVE_STRING string
 #endif
 
@@ -242,5 +243,5 @@
             {
                 ThrowException(General, std::string("The ") + it->second + " directory has been preoccupied by a file! \
-                                         Please remove " + it->first.string());
+                                         Please remove " + it->first.BF_GENERIC_STRING());
             }
             if (bf::create_directories(it->first)) // function may not return true at all (bug?)
@@ -261,5 +262,5 @@
         // Add that path to the PATH variable in case a module depends on another one
         std::string pathVariable(getenv("PATH"));
-        putenv(const_cast<char*>(("PATH=" + pathVariable + ';' + modulePath_.string()).c_str()));
+        putenv(const_cast<char*>(("PATH=" + pathVariable + ';' + modulePath_.BF_NATIVE_STRING()).c_str()));
 
         // Make sure the path exists, otherwise don't load modules
@@ -273,5 +274,5 @@
         while (file != end)
         {
-            std::string filename = file->BOOST_LEAF_FUNCTION();
+            std::string filename = file->BF_LEAF();
 
             // Check if the file ends with the extension in question
@@ -282,9 +283,5 @@
                     // We've found a helper file
                     const std::string& library = filename.substr(0, filename.size() - moduleextensionlength);
-#if BOOST_FILESYSTEM_VERSION < 3
-                    modulePaths.push_back((modulePath_ / library).file_string());
-#else
-                    modulePaths.push_back((modulePath_ / library).string());
-#endif
+                    modulePaths.push_back((modulePath_ / library).BF_NATIVE_STRING());
                 }
             }
@@ -297,35 +294,35 @@
     /*static*/ std::string PathConfig::getRootPathString()
     {
-        return getInstance().rootPath_.string() + '/';
+        return getInstance().rootPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getExecutablePathString()
     {
-        return getInstance().executablePath_.string() + '/';
+        return getInstance().executablePath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getDataPathString()
     {
-        return getInstance().dataPath_.string() + '/';
+        return getInstance().dataPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getExternalDataPathString()
     {
-        return getInstance().externalDataPath_.string() + '/';
+        return getInstance().externalDataPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getConfigPathString()
     {
-        return getInstance().configPath_.string() + '/';
+        return getInstance().configPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getLogPathString()
     {
-        return getInstance().logPath_.string() + '/';
+        return getInstance().logPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getModulePathString()
     {
-        return getInstance().modulePath_.string() + '/';
+        return getInstance().modulePath_.BF_GENERIC_STRING() + '/';
     }
 }
Index: /code/branches/kicklib/src/libraries/core/Resource.cc
===================================================================
--- /code/branches/kicklib/src/libraries/core/Resource.cc	(revision 8224)
+++ /code/branches/kicklib/src/libraries/core/Resource.cc	(revision 8225)
@@ -33,4 +33,11 @@
 #include <OgreFileSystem.h>
 #include <OgreResourceGroupManager.h>
+
+// Differentiate Boost Filesystem v2 and v3
+#if (BOOST_FILESYSTEM_VERSION < 3)
+#  define BF_GENERIC_STRING string
+#else
+#  define BF_GENERIC_STRING generic_string
+#endif
 
 namespace orxonox
@@ -98,5 +105,5 @@
                     boost::filesystem::path base(it->archive->getName());
                     base /= it->filename;
-                    ptr->fileSystemPath = base.string();
+                    ptr->fileSystemPath = base.BF_GENERIC_STRING();
                 }
                 return ptr;
Index: /code/branches/kicklib/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- /code/branches/kicklib/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 8224)
+++ /code/branches/kicklib/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 8225)
@@ -35,5 +35,4 @@
 
 #include <map>
-#include <boost/version.hpp>
 #include <boost/filesystem.hpp>
 
@@ -47,14 +46,13 @@
 #include "TclThreadManager.h"
 
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-#  define BOOST_LEAF_FUNCTION filename
-#  define BOOST_DICTIONARY_ENTRY_NAME string
-#elif (BOOST_FILESYSTEM_VERSION < 3)
-#  define BOOST_LEAF_FUNCTION leaf
-#  define BOOST_DICTIONARY_ENTRY_NAME string
+// Differentiate Boost Filesystem v2 and v3
+#if (BOOST_FILESYSTEM_VERSION < 3)
+#  define BF_LEAF leaf
+#  define BF_GENERIC_STRING string
+#  define BF_DICTIONARY_ENTRY_NAME string
 #else
-#  define BOOST_LEAF_FUNCTION path().filename().string
-#  define BOOST_DICTIONARY_ENTRY_NAME path().string
+#  define BF_LEAF path().filename().string
+#  define BF_GENERIC_STRING generic_string
+#  define BF_DICTIONARY_ENTRY_NAME path().string
 #endif
 
@@ -250,5 +248,5 @@
                 else
                 {
-                    const std::string& dir = startdirectory.string();
+                    const std::string& dir = startdirectory.BF_GENERIC_STRING();
                     if (dir.size() > 0 && dir[dir.size() - 1] == ':')
                         startdirectory = dir + '/';
@@ -262,7 +260,7 @@
                 {
                     if (boost::filesystem::is_directory(*file))
-                        dirlist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
+                        dirlist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BF_DICTIONARY_ENTRY_NAME()) + '/', file->BF_LEAF() + '/'));
                     else
-                        filelist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME(), getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()), file->BOOST_LEAF_FUNCTION()));
+                        filelist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME(), getLowercase(file->BF_DICTIONARY_ENTRY_NAME()), file->BF_LEAF()));
                     ++file;
                 }
