I'm trying to compile this extension to see if I can't use it in my
Resizable Sprays plugin.
Running the AMBuild script produces the following error on both GCC 7.5 and 10.3:
Spoiler
PHP Code:
In file included from /home/l4d2/metamod/sourcemod/public/IExtensionSys.h:37:0,
from /home/l4d2/metamod/sourcemod/public/smsdk_ext.h:41,
from /home/l4d2/metamod/sourcemod/public/smsdk_ext.cpp:34:
/home/l4d2/metamod/sourcemod/public/amtl/amtl/am-string.h: In function ‘std::unique_ptr<char []> ke::detail::SprintfArgsImpl(size_t*, const char*, va_list)’:
/home/l4d2/metamod/sourcemod/public/amtl/amtl/am-string.h:110:28: error: ‘make_unique’ is not a member of ‘std’
auto buffer = std::make_unique<char[]>(1);
^~~~~~~~~~~
/home/l4d2/metamod/sourcemod/public/amtl/amtl/am-string.h:110:28: note: suggested alternative: ‘__unique’
auto buffer = std::make_unique<char[]>(1);
^~~~~~~~~~~
__unique
/home/l4d2/metamod/sourcemod/public/amtl/amtl/am-string.h:110:40: error: expected primary-expression before ‘char’
auto buffer = std::make_unique<char[]>(1);
^~~~
/home/l4d2/metamod/sourcemod/public/amtl/amtl/am-string.h:116:24: error: ‘make_unique’ is not a member of ‘std’
auto buffer = std::make_unique<char[]>(len + 1);
^~~~~~~~~~~
/home/l4d2/metamod/sourcemod/public/amtl/amtl/am-string.h:116:24: note: suggested alternative: ‘__unique’
auto buffer = std::make_unique<char[]>(len + 1);
^~~~~~~~~~~
__unique
/home/l4d2/metamod/sourcemod/public/amtl/amtl/am-string.h:116:36: error: expected primary-expression before ‘char’
auto buffer = std::make_unique<char[]>(len + 1);
^~~~
In file included from /home/l4d2/metamod/hl2sdk-l4d2/public/tier1/utlvector.h:23:0,
from /home/l4d2/metamod/hl2sdk-l4d2/public/tier1/convar.h:21,
from /home/l4d2/metamod/hl2sdk-l4d2/public/eiface.h:16,
from /home/l4d2/metamod/metamod-source/core/ISmmAPI.h:45,
from /home/l4d2/metamod/metamod-source/core/ISmmPlugin.h:39,
from /home/l4d2/metamod/sourcemod/public/smsdk_ext.h:100,
from /home/l4d2/metamod/sourcemod/public/smsdk_ext.cpp:34:
/home/l4d2/metamod/hl2sdk-l4d2/public/tier1/utlmemory.h: In member function ‘void CUtlMemory<T, I>::Swap(CUtlMemory<T, I>&)’:
/home/l4d2/metamod/hl2sdk-l4d2/public/tier1/utlmemory.h:330:2: error: there are no arguments to ‘V_swap’ that depend on a template parameter, so a declaration of ‘V_swap’ must be available [-fpermissive]
V_swap( m_nGrowSize, mem.m_nGrowSize );
^~~~~~
/home/l4d2/metamod/hl2sdk-l4d2/public/tier1/utlmemory.h:330:2: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/l4d2/metamod/hl2sdk-l4d2/public/tier1/utlmemory.h:332:2: error: there are no arguments to ‘V_swap’ that depend on a template parameter, so a declaration of ‘V_swap’ must be available [-fpermissive]
V_swap( m_nAllocationCount, mem.m_nAllocationCount );
^~~~~~
Build failed: latedl.ext.2.l4d2/_home_l4d2_metamod_sourcemod_public_smsdk_ext.o
What do I need to do to get this to compile correctly?
I am hoping to build this on Ubuntu 18.04 for TF2 and L4D2.