| View previous topic :: View next topic |
| Author |
Message |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Thu May 21, 2009 1:22 am Post subject: Using Boost4PSP help |
|
|
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
| Code: | 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
|
|
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Thu May 21, 2009 2:01 am Post subject: |
|
|
remove -fno-rtti from makefile _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Thu May 21, 2009 2:55 am Post subject: |
|
|
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
| Code: | 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
|
|
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Thu May 21, 2009 5:06 am Post subject: |
|
|
Did you link your boost library? (dunno mayby -lboost) _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Thu May 21, 2009 6:30 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Fri May 22, 2009 12:42 am Post subject: |
|
|
| well it wont compile i didnt see libboost_filesystem.a in the install either so its headers are included but the lib isnt |
|
| Back to top |
|
 |
bronsky
Joined: 24 Dec 2006 Posts: 12 Location: Paris
|
Posted: Fri May 22, 2009 6:40 pm Post subject: |
|
|
Hi,
| 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. |
|
| Back to top |
|
 |
bronsky
Joined: 24 Dec 2006 Posts: 12 Location: Paris
|
Posted: Fri May 22, 2009 6:45 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Sat May 23, 2009 1:01 am Post subject: |
|
|
| i can compile with -frtti but not sure how to do it the compiling part |
|
| Back to top |
|
 |
|