Using Boost4PSP help

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Using Boost4PSP help

Post by coolkehon »

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: Select all

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&#58; In member function ‘virtual void* boost&#58;&#58;detail&#58;&#58;sp_counted_impl_pd<P, D>&#58;&#58;get_deleter&#40;const boost&#58;&#58;detail&#58;&#58;sp_typeinfo&&#41;’&#58;
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/sp_counted_impl.hpp&#58;149&#58; error&#58; cannot use typeid with -fno-rtti
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/sp_counted_impl.hpp&#58; In member function ‘virtual void* boost&#58;&#58;detail&#58;&#58;sp_counted_impl_pda<P, D, A>&#58;&#58;get_deleter&#40;const boost&#58;&#58;detail&#58;&#58;sp_typeinfo&&#41;’&#58;
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/detail/sp_counted_impl.hpp&#58;219&#58; error&#58; 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&#58;19,
                 from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem/operations.hpp&#58;17,
                 from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/filesystem.hpp&#58;16,
                 from main.cpp&#58;8&#58;
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/shared_ptr.hpp&#58; In function ‘D* boost&#58;&#58;get_deleter&#40;const boost&#58;&#58;shared_ptr<U>&&#41;’&#58;
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/boost/shared_ptr.hpp&#58;606&#58; error&#58; cannot use typeid with -fno-rtti
make&#58; *** &#91;main.o&#93; Error 1
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

remove -fno-rtti from makefile

Code: Select all

int main&#40;&#41;&#123;
     SetupCallbacks&#40;&#41;;
     makeNiceGame&#40;&#41;;
     sceKernelExitGame&#40;&#41;;
&#125;
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

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: Select all

main.o&#58; In function `__static_initialization_and_destruction_0&#40;int, int&#41;'&#58;
main.cpp&#58;&#40;.text+0x60&#41;&#58; undefined reference to `boost&#58;&#58;system&#58;&#58;get_system_category&#40;&#41;'
main.cpp&#58;&#40;.text+0x6c&#41;&#58; undefined reference to `boost&#58;&#58;system&#58;&#58;get_posix_category&#40;&#41;'
main.cpp&#58;&#40;.text+0x78&#41;&#58; undefined reference to `boost&#58;&#58;system&#58;&#58;get_posix_category&#40;&#41;'
main.cpp&#58;&#40;.text+0x84&#41;&#58; undefined reference to `boost&#58;&#58;system&#58;&#58;get_system_category&#40;&#41;'
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;make.elf&#93; Error 1
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

Did you link your boost library? (dunno mayby -lboost)

Code: Select all

int main&#40;&#41;&#123;
     SetupCallbacks&#40;&#41;;
     makeNiceGame&#40;&#41;;
     sceKernelExitGame&#40;&#41;;
&#125;
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

well it wont compile i didnt see libboost_filesystem.a in the install either so its headers are included but the lib isnt
bronsky
Posts: 12
Joined: Sun Dec 24, 2006 5:36 am
Location: Paris

Post by bronsky »

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.
bronsky
Posts: 12
Joined: Sun Dec 24, 2006 5:36 am
Location: Paris

Post by bronsky »

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.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

i can compile with -frtti but not sure how to do it the compiling part
Post Reply