Thread: [Solved] GCC version 4.6.4 and C++11
View Single Post
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 10-26-2018 , 15:30   GCC version 4.6.4 and C++11
Reply With Quote #1

I ran into a problem trying to build an extension against GCC 4.6.4: libstdc++.so.6.0.16
CS:S servers come with GLIBCXX_3.4.16 library and the VDS, that I need to run the extension on can't be updated to a newer version.
The server starts and works just fine, but my extension doesn't work:
Quote:
[05] <FAILED> file "extension.ext.2.css.so": bin/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /server/cstrike/addons/sourcemod/extensions/extension.ext.2.css.so)
I tried to rebuild it against 4.6.4:

Quote:
d@ubuntu:~/SDK/sourcemod/build$ python ../configure.py --sdks css
Checking CC compiler (vendor test gcc)... ['cc', 'test.c', '-o', 'test']
not found
Checking CC compiler (vendor test gcc)... ['gcc', 'test.c', '-o', 'test']
found gcc version 4.6
Checking CXX compiler (vendor test gcc)... ['c++', 'test.cpp', '-o', 'testp']
not found
Checking CXX compiler (vendor test gcc)... ['g++', 'test.cpp', '-o', 'testp']
found gcc version 4.6
And got this error:
Quote:
cc1plus: error: unrecognized command line option ‘-std=c++11’
Then I changed the std to '-std=c++0x'
And now I get this error:

Quote:
/home/d/SDK/sourcemod/public/IPluginSys.h:286:47: error: expected ‘;’ at end of member declaration
/home/d/SDK/sourcemod/public/IPluginSys.h:286:49: error: ‘final’ does not name a type
I'm a bit confused here. Sourcemod and all default extensions run just fine, and I see C++11, which can't work with gcc 4.6.4 (can it?).
The question is what is the right ambuild configuration to build extensions against 4.6.4?

In the documentation it's said that GCC 4.7+ is required for sm 1.7+. I've got sm 1.9 and GCC 4.6.1 on the VDS. Does sm has own built-in GCC library?

Last edited by kadet.89; 10-28-2018 at 14:58.
kadet.89 is offline
Send a message via Skype™ to kadet.89