2011-06-21 02:46:38 +00:00
|
|
|
Win32 builds
|
|
|
|
------------
|
|
|
|
|
|
|
|
MinGW
|
|
|
|
=====
|
|
|
|
|
|
|
|
For DLLs compatible with MSVC++ cross-compiled from Linux with MinGW, see
|
|
|
|
the build-win32.sh script in the scripts/ directory and its companion README
|
|
|
|
file.
|
|
|
|
|
|
|
|
|
|
|
|
Cygwin
|
|
|
|
======
|
|
|
|
|
2004-08-17 23:01:17 +00:00
|
|
|
From: "Mark J. Fine" <mark.fine@fineware-swl.com>
|
2004-08-01 22:07:40 +00:00
|
|
|
Subject: [Hamlib-developer] Building under Cygwin for Windows (Mingw32)
|
|
|
|
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=hamlib-developer>
|
|
|
|
Date: Sun, 20 Jun 2004 15:25:24 -0400
|
|
|
|
|
2004-08-17 23:01:17 +00:00
|
|
|
<revised by mjf Tue, 17 Aug, 2004>
|
2017-07-28 02:30:13 +00:00
|
|
|
<revised by n0nb Thu, 27 Jul 2017>
|
2004-08-01 22:07:40 +00:00
|
|
|
|
2011-06-21 02:46:38 +00:00
|
|
|
Found this to be helpful for building hamlib under Cygwin/Mingw32 for
|
2004-08-01 22:07:40 +00:00
|
|
|
linking with Windows apps:
|
|
|
|
|
2004-08-17 23:01:17 +00:00
|
|
|
|
2004-08-17 20:49:21 +00:00
|
|
|
1. To create the dlls, do the following from within Cygwin (assumes
|
2004-08-01 22:07:40 +00:00
|
|
|
Cygwin is fully updated):
|
|
|
|
|
2012-10-11 14:17:58 +00:00
|
|
|
$ export CC="gcc -mno-cygwin"
|
|
|
|
$ export CXX="g++ -mno-cygwin"
|
2017-07-28 02:30:13 +00:00
|
|
|
$ ./bootstrap
|
|
|
|
$ ./configure --prefix=/usr/local \
|
2012-10-11 14:17:58 +00:00
|
|
|
--build=i686-pc-cygwin \
|
|
|
|
--host=i686-pc-mingw32 \
|
2004-08-01 22:07:40 +00:00
|
|
|
--target=i686-pc-mingw32
|
2012-10-11 14:17:58 +00:00
|
|
|
|
2017-07-28 02:30:13 +00:00
|
|
|
Note: on subsequent runs you will only need to run 'bootstrap' if
|
|
|
|
there are modifications to any .ac, .m4, or Makefile.am files.
|
|
|
|
In that case, "make clean", and re-run 'bootstrap' as above.
|
2004-08-01 22:07:40 +00:00
|
|
|
|
|
|
|
# make
|
|
|
|
|
2004-08-17 23:01:17 +00:00
|
|
|
If you are only building one version of hamlib, you can proceed to
|
|
|
|
install it:
|
|
|
|
|
|
|
|
# make install
|
2004-08-01 22:07:40 +00:00
|
|
|
|
2004-08-17 23:01:17 +00:00
|
|
|
Note: Don't run "make install" if you've already made a native Cygwin or
|
|
|
|
Linux version of hamlib. It will interfere with the pkgconfig used for
|
|
|
|
linking the hamlib library with a native Cygwin or Linux application.
|
2011-06-21 02:46:38 +00:00
|
|
|
In fact if you are building two versions, it's best to have one tree for
|
2004-08-17 23:01:17 +00:00
|
|
|
native Cygwin and another tree for cross-compiling with MingW32. This way
|
|
|
|
you can avoid overwriting or corrupting any needed object files or libraries.
|
|
|
|
|
|
|
|
As an alternative to "make install", manually go through all of the .libs
|
|
|
|
in the source tree and copy the resulting .exes and .dlls in to a single
|
|
|
|
directory. Or, create a script or batch file to do it for you. Likewise,
|
|
|
|
you will need to copy all of the the .h files from include/hamlib into this
|
2004-08-17 20:49:21 +00:00
|
|
|
same directory.
|
2004-08-01 22:07:40 +00:00
|
|
|
|
|
|
|
Go to the directory you've just put all that stuff in and run:
|
|
|
|
# strip *.dll
|
|
|
|
# strip *.exe
|
|
|
|
This will make the resulting images smaller.
|
|
|
|
|
2004-08-17 23:01:17 +00:00
|
|
|
|
2004-08-17 20:49:21 +00:00
|
|
|
2. To create a MSVC-compatible interface library, do the following in a
|
2004-08-01 22:07:40 +00:00
|
|
|
Windows command window from the directory where you put all that stuff:
|
|
|
|
|
|
|
|
> lib /def:libhamlib.def /machine:IX86 /name:libhamlib-1-2-2cvs-2
|
|
|
|
|
2004-08-17 23:01:17 +00:00
|
|
|
This will create libhamlib.lib and libhamlib.exp. This example is for
|
2011-06-21 02:46:38 +00:00
|
|
|
hamlib v1.2.2cvs-2. You will have to use the correct version of the
|
|
|
|
library in the "/name:" switch, above.
|
2004-08-01 22:07:40 +00:00
|
|
|
|
2004-08-17 20:49:21 +00:00
|
|
|
REM: Using the (free) Microsoft Visual C++ Toolkit 2003, replace
|
|
|
|
the "lib" command by "link /lib".
|
|
|
|
|
|
|
|
libhamlib.lib and the .h includes from include/hamlib can now be used
|
|
|
|
within any MSVC build (i.e., dream), but all the dlls must be put in the
|
|
|
|
same directory or in PATH as the resulting .exe otherwise it won't find it.
|
|
|
|
|
2011-06-21 02:46:38 +00:00
|
|
|
--
|
2004-08-01 22:07:40 +00:00
|
|
|
|
|
|
|
Mark J. Fine
|
|
|
|
Remington, Virginia, USA
|