diff --git a/bake-test.cmd b/bake-test.cmd index b0bc3c5..5675b7d 100644 --- a/bake-test.cmd +++ b/bake-test.cmd @@ -1 +1 @@ -clang test\test_%test%.c src\libwinsane\libwinsane.obj -Iinc -g -lkernel32 -lDbghelp -lciabatta.lib \ No newline at end of file +clang test\test_%test%.c src\libwinsane\libwinsane.obj -Iinc -g -lciabatta.lib \ No newline at end of file diff --git a/readme b/readme index d769cbf..f337c89 100644 --- a/readme +++ b/readme @@ -32,10 +32,13 @@ PLATFORM SUPPORT - x86-64 USAGE - For clang users: add the following flags to your compilation command: - -I -nostdlib -mfma + NOTE: libwinsane.obj can be obtained by running: + bake -DNO_CRT + In the libwinsane directory. + Add the following flags to your compilation command: + -I libwinsane.obj -nostdlib -mfma Don't forget to link to the following libraries: - -lciabatta.lib -lkernel32 -lDbgHelp + -lciabatta.lib CONTRIBUTING Pull requests are always welcome. diff --git a/src/_win/environment.c b/src/_win/environment.c index fb14c1b..4571a06 100644 --- a/src/_win/environment.c +++ b/src/_win/environment.c @@ -7,6 +7,9 @@ int _fltused=0; extern int main(int argc, char** argv); +#pragma comment(lib, "kernel32.lib") +#pragma comment(lib, "DbgHelp.lib") + // Exit routines #define ATEXIT_FUNC_COUNT 64 #define ATQEXIT_FUNC_COUNT 64