summaryrefslogtreecommitdiff
path: root/common/staticlink/module.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /common/staticlink/module.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'common/staticlink/module.h')
-rw-r--r--common/staticlink/module.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/staticlink/module.h b/common/staticlink/module.h
new file mode 100644
index 0000000..e116324
--- /dev/null
+++ b/common/staticlink/module.h
@@ -0,0 +1,17 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: static link module stitching
+//
+//=============================================================================//
+
+// cannot be part of precompiled header chain
+#if defined(_WIN32) && defined(_STATIC_LINKED)
+
+// subsystems define _MODULE to create a unique symbol that can be referenced to force linkage
+// subsystems don't define _MODULE for "pure" stateless shared modules which prevents the module from having a "state" symbol
+// and causing linkage collision errors
+#if defined(_MODULE)
+DECLARE_MODULE(_MODULE)
+#endif
+
+#endif \ No newline at end of file