hfiref0x/WDExtract

Compile 32 bit

Closed this issue · 3 comments

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?

I wasn't designed to be 32bit compilable and has 32bit configuration left just by mistake. You have to fix that yourself.

  1. 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

  1. 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")
  2. Go to project settings for x86 -> Precompiled Headers - set it "Not using precompiled headers"
  3. Declare main as int __cdecl main
  4. 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

Check 1.0.3 commit, it should now compile for Win32 fine, zlibwapi 32/64 dlls included.

Thank you! All good!