i'm trying to use the path class from boost on my psp but when trying to compile i get this output how do i compile so i can use boost and also what does the flag -fno-rtti do anyway
In file included from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/shared_count.hpp:30,
from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/shared_ptr.hpp:28,
from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem/path.hpp:19,
from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem/operations.hpp:17,
from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem.hpp:16,
from main.cpp:8:
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/sp_counted_impl.hpp: In member function ‘virtual void* boost::detail::sp_counted_impl_pd<P, D>::get_deleter(const boost::detail::sp_typeinfo&)’:
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/sp_counted_impl.hpp:149: error: cannot use typeid with -fno-rtti
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/sp_counted_impl.hpp: In member function ‘virtual void* boost::detail::sp_counted_impl_pda<P, D, A>::get_deleter(const boost::detail::sp_typeinfo&)’:
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/sp_counted_impl.hpp:219: error: cannot use typeid with -fno-rtti
In file included from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem/path.hpp:19,
from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem/operations.hpp:17,
from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem.hpp:16,
from main.cpp:8:
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/shared_ptr.hpp: In function ‘D* boost::get_deleter(const boost::shared_ptr<U>&)’:
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/shared_ptr.hpp:606: error: cannot use typeid with -fno-rtti
make: *** [main.o] Error 1
main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text+0x60): undefined reference to `boost::system::get_system_category()'
main.cpp:(.text+0x6c): undefined reference to `boost::system::get_posix_category()'
main.cpp:(.text+0x78): undefined reference to `boost::system::get_posix_category()'
main.cpp:(.text+0x84): undefined reference to `boost::system::get_system_category()'
collect2: ld returned 1 exit status
make: *** [make.elf] Error 1
boost4PSP now includes boost::filesystem !? I asked if boost::filesystemcan be included a long time ago. Up to now, I thought it was an abandoned project.
coolkehon wrote:forgot to mention i tried that here is the output from removing that its in all the pspsdk samples for some reason and i dont even know what it does
RTTI stands for "RunTime Type Information". It's a mechanism that allows a program to get informations about the type of an object at run-time. You use RTTI when you use dynamic_cast or typeid.
-fno-rtti means "don't use RTTI", hence the "cannot use typeid with -fno-rtti" error message. This option is there for a reason: RTTI is not available on PSP (I guess that's what the "undefined reference" messages try to tell you). So basically, you won't compile a library that uses it.
hlide wrote:boost4PSP now includes boost::filesystem !? I asked if boost::filesystemcan be included a long time ago. Up to now, I thought it was an abandoned project.
Nope, still not included. I didn't have the time to include others libraries since then, being busy on other open source projects.
But even with time, I'm afraid libraries like Boost.FileSystem, Boost.Thread, etc that are very platform-dependent couldn't be easily integrated. The issue here with RTTI tends to confirm this.