Raised This Month: $169 Target: $400
 42% 

CUtlHash and STL Questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
showdax
Senior Member
Join Date: Dec 2004
Old 10-24-2005 , 19:05   CUtlHash and STL Questions
Reply With Quote #1

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.
showdax is offline
Send a message via MSN to showdax
BAILOPAN
Join Date: Jan 2004
Old 10-24-2005 , 21:01  
Reply With Quote #2

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.
__________________
egg
BAILOPAN is offline
showdax
Senior Member
Join Date: Dec 2004
Old 10-24-2005 , 21:55  
Reply With Quote #3

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
showdax is offline
Send a message via MSN to showdax
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:24.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode