aboutsummaryrefslogtreecommitdiff
path: root/sokol_gfx.h
diff options
context:
space:
mode:
authorspaceface <spaceface7777@gmail.com>2021-02-08 19:46:57 +0100
committerspaceface <spaceface7777@gmail.com>2021-02-08 19:46:57 +0100
commit78061e2a9a5286b9fab19fd461dfd22c1f3c803c (patch)
tree1b4d2f7c36a29459774712edc0db2921539a4c1f /sokol_gfx.h
parent16957726f71b9b8124b7e5f24c9ac145aaf60fc3 (diff)
Fix #pragma compilation with tcc on windows
tcc does not like the `.lib` suffix inside `#pragma comment (lib, "foo.lib")` directives - it fails with `tcc: error: library 'foo.lib' not found` errors. Removing the extension fixes tcc, and all major compilers (msvc/clang/gcc/mingw) compile fine without it, so this change should simply allow the headers to be compiled with a different compiler. We've needed to, and have made this change over at vlang/v several times already, ever since we supported tcc as a C compiler on windows, since tcc, but it keeps getting reverted every time we update the headers :)
Diffstat (limited to 'sokol_gfx.h')
-rw-r--r--sokol_gfx.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index 63f2e0af..139c3aeb 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -2565,13 +2565,13 @@ inline void sg_init_pass(sg_pass pass_id, const sg_pass_desc& desc) { return sg_
#include <d3dcompiler.h>
#ifdef _MSC_VER
#if (defined(WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
- #pragma comment (lib, "WindowsApp.lib")
+ #pragma comment (lib, "WindowsApp")
#else
- #pragma comment (lib, "kernel32.lib")
- #pragma comment (lib, "user32.lib")
- #pragma comment (lib, "dxgi.lib")
- #pragma comment (lib, "d3d11.lib")
- #pragma comment (lib, "dxguid.lib")
+ #pragma comment (lib, "kernel32")
+ #pragma comment (lib, "user32")
+ #pragma comment (lib, "dxgi")
+ #pragma comment (lib, "d3d11")
+ #pragma comment (lib, "dxguid")
#endif
#endif
#elif defined(SOKOL_METAL)