PDA

View Full Version : CUtlHash and STL Questions


showdax
10-24-2005, 18:05
Have any of you used CUtlHash before? I want something like the STL's hash_set but I don't want to use the STL. I've tried creating a CUtlHash<const char *> object but it segfaults when I try to insert, so I'm obviously doing something wrong.

Also, is there any way to remove libstdc++.so/libgcc_s.so dependencies from a plugin? I'm not using any std stuff as far as I can tell (unless something in the HL2 SDK uses them), and I'm not using any exception handling, yet they're still linked to.

BAILOPAN
10-24-2005, 20:01
Look at how SourceMM does it - the Makefile and the overloaded new/delete operators.

You can also use SourceHook::TinyHash if you don't feel like exploring Valve's hash solution.

showdax
10-24-2005, 20:55
Okay I added the new/delete stuff. Apparently having the compiler set to "g++" made it add that stuff, but with it set to gcc it works fine.

Edit: asldfkjslkfj;lk4jf