forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using Boost4PSP help

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Thu May 21, 2009 1:22 am    Post subject: Using Boost4PSP help Reply with quote

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
View user's profile Send private message MSN Messenger
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Thu May 21, 2009 2:01 am    Post subject: Reply with quote

remove -fno-rtti from makefile
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Thu May 21, 2009 2:55 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Thu May 21, 2009 5:06 am    Post subject: Reply with quote

Did you link your boost library? (dunno mayby -lboost)
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Thu May 21, 2009 6:30 am    Post subject: Reply with quote

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
View user's profile Send private message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Fri May 22, 2009 12:42 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
bronsky



Joined: 24 Dec 2006
Posts: 12
Location: Paris

PostPosted: Fri May 22, 2009 6:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
bronsky



Joined: 24 Dec 2006
Posts: 12
Location: Paris

PostPosted: Fri May 22, 2009 6:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Sat May 23, 2009 1:01 am    Post subject: Reply with quote

i can compile with -frtti but not sure how to do it the compiling part
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group