Link win32 libs in code; add /nologo /diagnostics:caret /noimplib /noexp

main
Phillip Trudeau-Tavara 1 year ago
parent 92fc09d2d6
commit 6c0a832f61

@ -15,7 +15,7 @@ if "%should_do_blender_export%"=="1" ( call blender_export.bat || goto :error )
if "%should_do_codegen%"=="1" ( call run_codegen.bat || goto :error )
@REM start /B zig cc -DDEVTOOLS -Igen -Ithirdparty -lDbghelp -lGdi32 -lD3D11 -lOle32 -lwinhttp -gfull -gcodeview -o main_zig.exe main.c
cl /diagnostics:caret /DDEVTOOLS /Igen /Ithirdparty /Wall /FC /Zi /WX Dbghelp.lib winhttp.lib main.c || goto :error
cl /nologo /diagnostics:caret /DDEVTOOLS /Igen /Ithirdparty /Wall /FC /Zi /WX main.c /link /noimplib /noexp || goto :error
goto :EOF

@ -43,8 +43,6 @@
#pragma warning(push, 3)
#include <Windows.h>
#include <processthreadsapi.h>
#include <dbghelp.h>
#include <stdint.h>
// https://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
@ -474,6 +472,7 @@ LPCWSTR windows_string(MD_String8 s)
#ifdef DESKTOP
#ifdef WINDOWS
#pragma warning(push, 3)
#pragma comment(lib, "WinHttp")
#include <WinHttp.h>
#include <process.h>
#pragma warning(pop)
@ -3751,9 +3750,11 @@ typedef enum
typedef BUFF(char, 200) StacktraceElem;
typedef BUFF(StacktraceElem, 16) StacktraceInfo;
#if 0 // #ifdef WINDOWS
#include <dbghelp.h>
#pragma comment(lib, "DbgHelp")
StacktraceInfo get_stacktrace()
{
#ifdef WINDOWS
StacktraceInfo to_return = {0};
void *stack[ARRLEN(to_return.data)] = {0};
int captured = CaptureStackBackTrace(0, ARRLEN(to_return.data), stack, 0);
@ -3787,10 +3788,13 @@ StacktraceInfo get_stacktrace()
free(symbol);
}
return to_return;
}
#else
StacktraceInfo get_stacktrace()
{
return (StacktraceInfo){0};
#endif
}
#endif
typedef struct DrawParams
{

@ -12,11 +12,11 @@ if exist gen\ (
thirdparty\sokol-shdc.exe --input threedee.glsl --output gen\threedee.glsl.h --slang glsl100:hlsl5:metal_macos:glsl330 || goto :error
@REM metadesk codegen
cl /Ithirdparty /W3 /Zi /WX codegen.c || goto :error
cl /nologo /diagnostics:caret /Ithirdparty /W3 /Zi /WX codegen.c || goto :error
@REM zig cc -Ithirdparty -gfull -gcodeview codegen.c -o codegen.exe || goto error
codegen || goto :error
@REM cl /Ithirdparty /Igen /W3 /Zi /WX maketraining.c || goto :error
@REM cl /nologo /diagnostics:caret /Ithirdparty /Igen /W3 /Zi /WX maketraining.c || goto :error
@REM maketraining || goto :error
goto :EOF

Loading…
Cancel
Save