Build differently named 32 and 64 bit binaries for libexpat
- msvc: tested with MSVS 2019 Community Edition
- libexpat VS2019 solution: tested with these sources
- Save these files to C:\local\temp and open expat.sln
- Select Build -> Batch and select all four configurations (Release|Debug)<-->(x64|Win32) and build (skip templates)
- Place the files into C:\local\libs\libexpat
- \include all .h files except macconfig.h and amigaconfig.h
- \bin Release: libexpat32.dll, libexpat64.dll Debug: libexpat32d.dll, libexpat64d.dll
- \lib Release: libexpat32.lib, libexpat64.lib Debug: libexpat32d.lib, libexpat64d.lib
- Place the files into C:\local\libs\libexpat
- Extract libexpat201.7z (source code from sourceforge)
- Open the VC++ project expat.dsw and allow the upgrade
- Rename the project expat to libexpat and delete all the other projects
- Add x64 configuration by right clicking Solution in Solution Explorer -> Configuration Manager
- Under Active solution platform -> New … -> x64 and OK (copying settings from x86)
- Under project properties for the project libexpat do the following:
- Configuration Properties -> General -> Target Name
- x64 Release $(ProjectName)64
- x64 Debug $(ProjectName)64d
- Win32 Release $(ProjectName)32
- Win32 Debug $(ProjectName)32d
- C/C++ -> Precompiled Headers -> Precompiled Header
- ALL Not Using Precompiled Headers
- Linker -> General -> Output File
- ALL
$(OutDir)$ (TargetName)$(TargetExt)
- ALL
- Linker -> Advanced -> Import Library
- ALL
$(OutDir)$ (TargetName).lib
- ALL
- C/C++ -> Code Generation -> Function Level Linking
- ALL Yes (/Gy)
- C/C++ -> Code Generation -> Runtime Library
- Debug MDd
- Release MD
- Configuration Properties -> General -> Target Name
- All four configurations ready to be built as this ready-made solution
- Under Build -> Batch Build select all except the Template|x86 and Template|x64
- Build
- Place the files into C:\local\libs\libexpat
- \include all .h files except macconfig.h and amigaconfig.h
- \bin Release: libexpat32.dll, libexpat64.dll Debug: libexpat32d.dll, libexpat64d.dll
- \lib Release: libexpat32.lib, libexpat64.lib Debug: libexpat32d.lib, libexpat64d.lib