udoprog / c10t

A minecraft cartography tool
Other
225 stars 50 forks source link

Compile error in level.cpp / fileutils.hpp #160

Closed lordastley closed 13 years ago

lordastley commented 13 years ago

Compiling fails with the following error:

Scanning dependencies of target c10t-mc
[  4%] Building CXX object src/mc/CMakeFiles/c10t-mc.dir/blocks.cpp.o
[  8%] Building CXX object src/mc/CMakeFiles/c10t-mc.dir/level.cpp.o
In file included from /home/orz/minecraft_server/c10t/src/mc/world.hpp:13:0,
                 from /home/orz/minecraft_server/c10t/src/mc/level.hpp:12,
                 from /home/orz/minecraft_server/c10t/src/mc/level.cpp:3:
/home/orz/minecraft_server/c10t/src/fileutils.hpp: In member function âbool dirlist::has_next(bool (*)(const std::string&), bool (*)(const std::string&))â:
/home/orz/minecraft_server/c10t/src/fileutils.hpp:57:50: error: invalid initialization of reference of type âconst std::string&â from expression of type âboost::filesystem3::pathâ
make[2]: *** [src/mc/CMakeFiles/c10t-mc.dir/level.cpp.o] Error 1
make[1]: *** [src/mc/CMakeFiles/c10t-mc.dir/all] Error 2
make: *** [all] Error 2

Arch Linux x86 kernel 2.6.36 gcc (GCC) 4.5.2 20110127 (prerelease) boost 1.46.0-4 c10t git commit e6fdc7cbaf2cb0694b5c3556d52a8dc4d4fe9729

smackysnacks commented 13 years ago

I already posted a fix for this. The problem is the current version of c10t works with boost filesystem library version 2 but 1.46 switched to filesystem library version 3

If you wanna try it out, just pull from my fork

lordastley commented 13 years ago

Ah, thanks. That seems to have done the trick.