Results 1 to 3 of 3

Thread: Compilation errors with C++ libraries (game-porting)

                  
   
  1. #1
    DCEmu Newbie
    Join Date
    Feb 2008
    Location
    Canberra
    Posts
    2
    Rep Power
    0

    Default Compilation errors with C++ libraries (game-porting)

    To all, have just decided to dust off my dreamcast after finding a Train controller, keyboard, mouse and VMU-Microphone in Japan to use with it.

    I thought it'd be a fun challenge to port a game over to the DC though am having some issues compiling.. have been slowing hacking through the code to make it fit the DC but it seems that I've found the file-handling procedures which want STL Libraries? GCC then doesn't know what to do with itself:

    Code:
    fileio.o(.gnu.linkonce.t._ZNSt8_Rb_treeISsSt4pairIKSs16TarFileListEntryESt10_Select1stIS3_ESt4lessISsESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E+0x84): 
    In function 	`std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 
    		std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry>, 		std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry> >, 
    		std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, 
    		std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry> > >::_M_erase(std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry> >*)':
    /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.6/../../../../include/c++/3.4.6/bits/stl_tree.h:470:
    undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
    ^^ my cool error... G++ is having a tiff with it's own headers and since it's in the linking stage it's obvious I have left out a library but as to which one I don't know...

    I suppose I just need to know what 'standard C' libraries I can use with KOS/sh-elf and what I can't...

    Another chunk of error text from the same linking session:

    Code:
    fileio.o(.gnu.linkonce.t._ZNSt8_Rb_treeISsSt4pairIKSs16TarFileListEntryESt10_Select1stIS3_ESt4lessISsESaIS3_EE13insert_uniqueERKS3_+0x194): 
    In function 	`std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 
    		std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry>, 		std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry> >, 		std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, 
    		std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry> > >::insert_unique(std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, TarFileListEntry> const&)':
    
    /usr/local/dc/openttd/src/fileio.cpp:98: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'

    Any insight would be greatly appreciated!

  2. #2
    DCEmu Newbie
    Join Date
    Feb 2008
    Location
    Canberra
    Posts
    2
    Rep Power
    0

    Default

    OK, The above issue was repaired by linking in all the proper libraries... order seemed to make a difference.

    I'm now curious about endian support... does the KOS library load the CPU in little or big endian? Because I know the bin2o romdisk image creator creates a little-endian image and this is starting to confuse the hell out of me...

    If anyone can shed light on why I am getting so confused then I'd be greatly appreciative...

  3. #3
    DCEmu Old Pro Elven6's Avatar
    Join Date
    May 2006
    Posts
    1,158
    Rep Power
    71

    Default

    What compiler are you using?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •