Raised This Month: $ Target: $400
 0% 

Extensions + C++11


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 06-16-2014 , 17:03   Extensions + C++11
Reply With Quote #1

Is there a way to use c++11 features in sourcemod extensions without SourceMod complaining about undefined symbol?
WildCard65 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-16-2014 , 22:05   Re: Extensions + C++11
Reply With Quote #2

The game (and thus SourceMod) isn't compiled against stdlib, but rather Valve's version of it (vstdlib).
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-17-2014 , 13:24   Re: Extensions + C++11
Reply With Quote #3

Quote:
Originally Posted by Powerlord View Post
The game (and thus SourceMod) isn't compiled against stdlib, but rather Valve's version of it (vstdlib).
There is no relation between stdlib and vstdlib other than similar names. Valve compile against stdlib, but we do not due to ABI differences between versions. They work around that to an extent by shipping a copy of libstdc++.so.6 with most of their game servers and using LD_LIBRARY_PATH to override the system copy.
psychonic is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-18-2014 , 13:54   Re: Extensions + C++11
Reply With Quote #4

Quote:
Originally Posted by psychonic View Post
Valve compile against stdlib, but we do not due to ABI differences between versions.
You might want to take a look at what AMBuild2 is doing in bug 6143.

Edit: Although I guess that's technically linking, not compiling.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-18-2014 at 13:55.
Powerlord is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-18-2014 , 14:14   Re: Extensions + C++11
Reply With Quote #5

I misspoke. We link against it but avoid using features from it where possible.
psychonic is offline
Reply



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 22:55.


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