Compile 32 bit
Closed this issue · 3 comments
zer0cat commented
Hello
I cannot compile 32bit version. Some errors with zlib. Download 32 bit .lib and .dll, but have such error.
Can you compile it or this is impossible?
hfiref0x commented
I wasn't designed to be 32bit compilable and has 32bit configuration left just by mistake. You have to fix that yourself.
- Add proper lib file. Note that you need proper zlibwapi.dll 32 bit too.
add something like that
#ifdef _M_IX86
#pragma comment(lib, "zlib/lib/zlibwapi32.lib")
#elif _M_AMD64
#pragma comment(lib, "zlib/lib/zlibwapi64.lib")
#endif
- Go to project settings for x86 -> C/C++ Calling Convertion - set it stdcall instead of cdecl (or set #define ZLIB_WINAPI before #include "zlib.h")
- Go to project settings for x86 -> Precompiled Headers - set it "Not using precompiled headers"
- Declare main as int __cdecl main
- Fix StringCchLength/printf_s (size_t instead of SIZE_T, different type modifiers) compiler bitching
Oh and I almost forgot, add
#include <intrin.h> to the globals.h
hfiref0x commented
Check 1.0.3 commit, it should now compile for Win32 fine, zlibwapi 32/64 dlls included.
zer0cat commented
Thank you! All good!