Hehe, just kidding ;-) There's #define CFG_String std::string, so changing only one line should suffice. Of course, assuming that I understood you correctly - change std::string to my own basic_string typedef with own allocator, recompile everything... and voila!
Btw, of course you are right, first I thought that those errors are both in std::string and std::map, but after examining all errors, it looks that maps are ok.
Quote:
as you are using a GCC compiler already you can just use __gnu_cxx::malloc_allocator in header ext/malloc_allocator.h as you can probably tell its uses malloc/free for allocation/deallocation instead but remember its not part of the standard its a GCC library extension so its trivial to define your own if you want.
Hmmm, there's no malloc_allocator.h in my MinGW 3.5(not standard GCC, I'm compiling on Win) compiler. Maybe I'm using (too) old version?
Anyway, you mentioned that its trivial to implement such allocator. I have in GPG #3 chapter about writing STL allocators, but anyway I'd like to see other examples (if you have any :-) ).
---
Btw, if any idiot ever said that error messagess in MinGW are user friendly... this snippet is for him:
(.text$_ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSs18CFG_Internal_GroupEESt24__default_alloc_templateILb1ELi0EEE8allocateEj+0x2c):SDL_config.c: undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned)'(.text$_ZNSt8_Rb_treeISsSt4pairIKSs18CFG_Internal_EntryESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeERKS3_+0x6f):SDL_config.c: undefined reference to `__cxa_begin_catch'(.text$_ZNSt8_Rb_treeISsSt4pairIKSs18CFG_Internal_EntryESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeERKS3_+0x8d):SDL_config.c: undefined reference to `__cxa_rethrow'(.text$_ZNSt8_Rb_treeISsSt4pairIKSs18CFG_Internal_EntryESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeERKS3_+0xb0):SDL_config.c: undefined reference to `__cxa_end_catch'(.text$_ZSt10_ConstructISt4pairIKSs18CFG_Internal_EntryES3_EvPT_RKT0_+0xc):SDL_config.c: undefined reference to `__gxx_personality_sj0'(.text$_ZStltIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_+0x14):SDL_config.c: undefined reference to `std::string::compare(std::string const&) const'
That's exactly the same what snk_kid said post above, the only differenc is that's in compiler's language... ;-)