SourceSDK headers in Linux

When I include the header icvar.h from SourceSDK 2013, it gives a huge pile errors, like




/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:27:1: note: in expansion of macro 'PLATFORM_INTERFACE'
 PLATFORM_INTERFACE double g_ClockSpeedMillisecondsMultiplier;
 ^
/home/steam1/fordll/SourceSDK/src/public/tier0/platform.h:1075:28: error: 'DLL_IMPORT' does not name a type
 #define PLATFORM_INTERFACE DLL_IMPORT
                            ^
/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:28:1: note: in expansion of macro 'PLATFORM_INTERFACE'
 PLATFORM_INTERFACE double g_ClockSpeedSecondsMultiplier;
 ^
In file included from /home/steam1/fordll/SourceSDK/src/public/tier0/platform.h:1327:0,
                 from /home/steam1/fordll/SourceSDK/src/public/tier1/interface.h:52,
                 from /home/steam1/fordll/SourceSDK/src/public/appframework/IAppSystem.h:16,
                 from /home/steam1/fordll/SourceSDK/src/public/icvar.h:13,
                 from ../src/gm_example.cpp:6:
/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:74:22: error: variable 'DLL_CLASS_IMPORT CClockSpeedInit' has initializer but incomplete type
 class PLATFORM_CLASS CClockSpeedInit
                      ^
/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:75:1: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
 {
 ^
/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:76:1: error: expected primary-expression before 'public'
 public:
 ^
/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:76:1: error: expected '}' before 'public'
/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:76:1: error: expected ',' or ';' before 'public'
/home/steam1/fordll/SourceSDK/src/public/tier0/fasttimer.h:83:1: error: expected declaration before '}' token
 };


And one of them



/home/steam1/fordll/SourceSDK/src/public/tier0/platform.h:557:2: error: #error "Unsupported Platform."
 #error "Unsupported Platform."


When I tried to include this header from SourceSDK 2007 I was given this



steam1@tommygodlike:~/fordll/gmod-module-base-master/example/linux-gmake$ make config=release32
==== Building gmsv_example (release32) ====
gm_example.cpp
In file included from /home/steam1/fordll/c++/public/tier1/interface.h:50:0,
                 from /home/steam1/fordll/c++/public/appframework/iappsystem.h:16,
                 from /home/steam1/fordll/c++/public/icvar.h:13,
                 from ../src/gm_example.cpp:6:
/home/steam1/fordll/c++/public/tier0/platform.h:46:17: fatal error: new.h: No such file or directory
 #include <new.h>
                 ^
compilation terminated.
gmsv_example.make:128: recipe for target 'obj/x32/gm_example.o' failed
make[1]: *** [obj/x32/gm_example.o] Error 1
Makefile:16: recipe for target 'gmsv_example' failed
make: *** [gmsv_example] Error 2


Can you explain for a noob how to include the headers from the SourceSDK in Linux? I use g++ 4.9.2

Without going over the full instructions myself, you can generally add additional include directories by using



export CPPFLAGS="-I/path/to/headers"


before running make

I’m ran



steam1@tommygodlike:~/fordll/gmod-module-base-master/example/linux-gmake$ export CPPFLAGS="-I/home/steam1/fordll/SourceSDK/src/public"
steam1@tommygodlike:~/fordll/gmod-module-base-master/example/linux-gmake$ make config=release32


But I got the same errors.
The problem is not that headers is not included, problem is that g++ gives syntax errors at the SourceSDK