If you're using a newer version of gcc than the version the host box came with,
you may need to ship libstdc++.so, libc.so or others with your game .so.
GNU/Linux does an absolutely abysmal job of helping you in this respect. There
is, for instance, no way to fully statically link a dynamically linkable
library.
At 2006/05/06 01:29 PM, Jay C. wrote:
>I had to remove dependance on the standard STL library, otherwise server
>admins were getting a cannot find libstd error.
>I cant believe the code got so muddled in the original mails, no line breaks
>:\
>
>But yeah, I re-wrote it removing Valve's functions and its working but I
>thought the reason for these functions was to help us. Most of them aren't
>used in the SDK at all, so what are they there for?
>
>---------------------------------------------
>CUtlVector<char*, CUtlMemory<char*> > outStrings;
>const char *sToDo = "gren, pans, heli";
>Q_SplitString( sToDo, ",", outStrings );
>char sTmp[25] = "";
>int x = 0;
>for ( x = 0; x < outStrings.Count(); x++ )
>{
> Q_StrSubst( outStrings[x], " ", "", sTmp, 25, true );
> META_LOG( g_PLAPI, "String:'%s'", sTmp );
>}
>Q_strcpy( sTmp, "" );
>outStrings.PurgeAndDeleteElements();
>return;
>---------------------------------------------
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:hlcoders-
>> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
>> Sent: 06 May 2006 19:07
>> To: [email protected]
>> Subject: Re: [hlcoders] VSTDLIB Whoes.
>>
>> I'd highly recommend avoiding those CUtl things in that context. Just use
>> regular STL unless you're dealing with a Valve interface that demands
>> something else. STL is much more robust and easier to debug.
>>
>> At 2006/05/04 08:58 AM, Jay C. wrote:
>> >I'm trying (unsuccessfully) to use some of the VSTBLIB functions provided
>> in
>> >strtools.h
>> >
>> >I have the following code, which when run in the IDE gives me a user
>> >breakpoint in free.c:101 - HeapFree.
>> >When I run it compiled it crashes SRCDS.
>> >
>> >---------------------------------------------
>> >
>> >CUtlVector<char*, CUtlMemory<char*> > outStrings;
>> >const char *sToDo = "gren, pans, heli";
>> >Q_SplitString( sToDo, ",", outStrings );
>> >char sTmp[25] = "";
>> >int x = 0;
>> >for ( x = 0; x < outStrings.Count(); x++ )
>> >{
>> > Q_StrSubst( outStrings[x], " ", "", sTmp, 25, true );
>> > META_LOG( g_PLAPI, "String:'%s'", sTmp );
>> >}
>> >Q_strcpy( sTmp, "" );
>> >outStrings.PurgeAndDeleteElements();
>> >return;
>> >
>> >---------------------------------------------
>> >
>> >It stops when I remove PurgeandDeleteElements() but then I'm causing
>> memory
>> >leaks :\
>> >
>> >Has anyone else had this problem or anything related?
>> >
>> >Thanks
>> >- Jason Croghan
>> >
>> >
>> >_______________________________________________
>> >To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> >http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>
>
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives, please
>visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders