• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Function leaf()

multrayzor

New Member
Joined
Mar 17, 2014
Messages
58
Reaction score
2
I´ve followed some tutorial on how to compile tfs and got stuck when i start the make process, apperently the function leaf() doesnt exist in the library anymore and makes the process fail, i read that i should change it to path().filename().string(), but i dont really know how do it. So if anyone else can help it would be great!

g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__USE_MYSQL__ -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -MT items.o -MD -MP -MF .deps/items.Tpo -c -o items.o items.cpp
mv -f .deps/itemattributes.Tpo .deps/itemattributes.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__USE_MYSQL__ -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
luascript.cpp: In member function ‘bool LuaScriptInterface::loadDirectory(const string&, Npc*)’:
luascript.cpp:719:23: error: ‘class boost::filesystem3::directory_entry’ has no member named ‘leaf’
mv -f .deps/items.Tpo .deps/items.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__USE_MYSQL__ -D_THREAD_SAFE -D_REENTRANT -Wall -g -O1 -MT mailbox.o -MD -MP -MF .deps/mailbox.Tpo -c -o mailbox.o mailbox.cpp
make[1]: *** [luascript.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/mailbox.Tpo .deps/mailbox.Po
make[1]: Leaving directory `/root/tfs'
make: *** [all] Error 2

Yours,
Gabe
 
Thanks for the help, i already got it fixed, but forgot to update the post
The fix is exactly as you told, you have to go to luascript.cpp and change leaf() for path().filename().string()
Apperently the function leaf was deprecated.

The doubt is solved, ready to close :D
 
Back
Top