This file is a HOWTO for the cross-compiling of Windows 32 bit binary DLLs built from a tarball generated by 'make dist' in a Git checkout. The resulting DLLs are built with a cdecl interface compatible with MS VC++. Prerequisites ============= In these steps the release or daily snapshot tarball is unpacked in ~/builds for the Windows 32 build and all operations are done from there unless otherwise noted. Under Linux you need at least the mingw32 package to cross-compile it (although mingw-w64-i696 is being used to build the daily snapshots) zip to create the archive, the tofrodos or dos2unix package installed to convert to DOS text format, and Wine plus the free MVC++Toolkit available from: http://uploading.com/files/HNH73WB3/VCToolkitSetup%28v1.01%29%282004.07.06%29.zip.html to create the Windows 32 .LIB file (unzip and then install it with Wine in the usual way). NB: Debian Squeeze and later users will need at least the mingw32-runtime 3.15 package as the 3.13 package is broken. You can manually install the Ubuntu version from: http://packages.ubuntu.com/maverick/devel/mingw32-runtime On Debian Jesse the mingw-w64-i686 pacakge works and is being used to build the daily Windows 32 snapshots. Finally, the Windows 32 version of libusb must be available for the USB backends to be built. Download the latest libusb-win32-bin-1.2.4.0.zip from: https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.4.0/ and unzip the archive in ~/builds/libusb-win32-bin-1.2.4.0 Any version of libusb from 1.2.3.0 is known to work. Several variables may need to be set differently at the top of the script file depending on your system. The script now relies on a pair of environment variables to locate the needed libusb files and the third party pkg-config utility is no longer used for libusb. The script generates PDF documents for the included .EXE files using the groff and ps2pdf utilities to convert the nroff formatted man pages. On Debian and derivatives, installing the groff and ghostscript packages will provide them. Build for Windows 32, cross-compile on Linux: ============================================= Extract the Hamlib tarball into ~/builds (if you prefer another directory be sure to edit the BUILD_DIR variable in the build-win32.sh script): $ tar xvfz ~/Downloads/hamlib-3.0~git-???????-20121007.tar.gz Invoke the build-win32.sh script (it requires a Bash shell) with the name of the directory/Hamlib version to build (you need not cd into the hamlib directory, although it won't hurt. The build-win32 script uses absolute paths): $ build-win32.sh hamlib-3.0~git Release Info ============ The structure of the archive is: $ tree -d . |-- bin |-- doc |-- include | `-- hamlib |-- lib | |-- gcc | `-- msvc `-- pdf 8 directories The bin directory is where the executables and DLL files are placed. Header files are under include/Hamlib and compiler specific files are under lib/*. PDF documents for the .EXE programs are in pdf/ while text documents (READMEs and such) are in the main archive directory. The doc/ directory contains the generated HTML manual. The embedded README.win32-bin file generated by the build-win32.sh script describes setting the PATH environment variable in Windows 2000, Windows XP, and Windows 7. 73, Nate, N0NB