mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Support for building with MSVC much like for Unix.
This commit is contained in:
91
README.woe32
91
README.woe32
@@ -1,7 +1,12 @@
|
||||
Installation on Woe32 (WinNT/2000/XP/Vista/7, Win95/98/ME):
|
||||
Installation on Woe32 (Microsoft Windows):
|
||||
|
||||
There are three ways to create binaries of this package for Woe32:
|
||||
1) Native binaries, built using the mingw tool chain.
|
||||
2) Native binaries, built using the MS Visual C/C++ tool chain.
|
||||
3) Binaries for the Cygwin environment. For these, please see the normal
|
||||
INSTALL file.
|
||||
|
||||
===============================================================================
|
||||
1) Native binaries, built using the mingw tool chain.
|
||||
|
||||
I recommend to use the cygwin environment as the development environment
|
||||
@@ -10,49 +15,79 @@ There are three ways to create binaries of this package for Woe32:
|
||||
- cygwin,
|
||||
- the mingw runtime package, also from the cygwin site.
|
||||
|
||||
Building for mingw is achieved through the following preparation
|
||||
and configure commands:
|
||||
Building for mingw is achieved through the following preparation,
|
||||
configure, and build commands:
|
||||
|
||||
PATH=/usr/local/mingw/bin:$PATH
|
||||
export PATH
|
||||
./configure --host=i586-pc-mingw32 --prefix=/usr/local/mingw \
|
||||
CC="gcc-3 -mno-cygwin" \
|
||||
CXX="g++-3 -mno-cygwin"
|
||||
make
|
||||
make check
|
||||
|
||||
Installation:
|
||||
|
||||
make install
|
||||
|
||||
===============================================================================
|
||||
2) Native binaries, built using the MS Visual C/C++ tool chain.
|
||||
|
||||
- Requires MS Visual C/C++ 4.0 or 5.0 or 6.0 or 7.0.
|
||||
Note that binaries created with MSVC have a distribution constraint: They
|
||||
depend on a closed-source library ('msvcr70.dll' for MSVC 7.0, 'msvcr90.dll'
|
||||
for MSVC 9.0, and so on) which is not normally part of a Windows
|
||||
installation.
|
||||
You cannot distribute 'msvcr*.dll' with the binaries - this would be a
|
||||
violation of the GPL and of the Microsoft EULA.
|
||||
You can distribute the binaries without including 'msvcr*.dll', but this
|
||||
will cause problems for users that don't have this library on their system.
|
||||
Therefore it is not recommended; the mingw tool chain is preferred for
|
||||
this reason.
|
||||
|
||||
Note that binaries created with MSVC 7.0 should not be distributed: They
|
||||
depend on a closed-source library 'msvcr70.dll' which is not normally part
|
||||
of a Woe32 installation. You cannot distribute 'msvcr70.dll' with the
|
||||
binaries - this would be a violation of the GPL and of the Microsoft EULA.
|
||||
You can distribute the binaries without including 'msvcr70.dll', but this
|
||||
will cause problems for users that don't have this library on their system.
|
||||
Therefore it is not recommended. This problem does not occur with MSVC 6.0
|
||||
and earlier.
|
||||
Requires MS Visual C/C++ 4.0 or newer. The "Express" edition which
|
||||
contains just the tools and not the IDE is sufficient.
|
||||
|
||||
- Cannot build in a separate directory.
|
||||
Requires also a cygwin or mingw environment (with 'bash', the common POSIX
|
||||
commands, and 'make' ) as a build environment. Building with "nmake" is no
|
||||
longer supported.
|
||||
|
||||
- Build instructions:
|
||||
Make sure that the MSVC tools ("cl" etc.) are found in PATH.
|
||||
In a typical MSVC 6.0 installation, this can be achieved by running
|
||||
C:\Program Files\Microsoft Visual Studio\VC98\bin\vcvars32.bat
|
||||
In a typical MSVC 7.0 installation, it can be achieved by running
|
||||
C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\vsvars32.bat
|
||||
In a typical MSVC 9.0 installation, it can be achieved by running
|
||||
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat
|
||||
|
||||
Make sure that the MSVC4.0 or MSVC5.0 or MSVC6.0 or MSVC7.0 utilities
|
||||
("cl" etc.) are found in PATH. In a typical MSVC6.0 installation, this
|
||||
can be achieved by running
|
||||
C:\Program Files\Microsoft Visual Studio\VC98\bin\vcvars32.bat
|
||||
In a typical MSVC7.0 installation, it can be achieved by running
|
||||
C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\vsvars32.bat
|
||||
nmake -f Makefile.msvc
|
||||
Then start a bash (from cygwin or mingw).
|
||||
|
||||
- Installation:
|
||||
Building for mingw is achieved through the following preparation,
|
||||
configure, and build commands:
|
||||
|
||||
Either:
|
||||
PATH=/usr/local/msvc/bin:$PATH
|
||||
export PATH
|
||||
|
||||
Copy gperf.exe to your program repository.
|
||||
win32_target=_WIN32_WINNT_WINXP # for MSVC 9.0
|
||||
win32_target=_WIN32_WINNT_VISTA # possibly for MSVC >= 10.0
|
||||
win32_target=_WIN32_WINNT_WIN7 # possibly for MSVC >= 10.0
|
||||
|
||||
Or:
|
||||
./configure --host=i586-pc-mingw32 --prefix=/usr/local/msvc \
|
||||
CC="`pwd`/build-aux/compile cl -nologo" \
|
||||
CFLAGS="-MD" \
|
||||
CXX="`pwd`/build-aux/compile cl -nologo" \
|
||||
CXXFLAGS="-MD" \
|
||||
CPPFLAGS="-D_WIN32_WINNT=$win32_target -I/usr/local/msvc/include" \
|
||||
LDFLAGS="-L/usr/local/msvc/lib" \
|
||||
LD="link" \
|
||||
NM="dumpbin -symbols" \
|
||||
STRIP=":" \
|
||||
AR="`pwd`/build-aux/ar-lib lib" \
|
||||
RANLIB=":"
|
||||
make
|
||||
make check
|
||||
|
||||
nmake -f Makefile.msvc install prefix=InstallBaseDirectory
|
||||
Installation:
|
||||
|
||||
3) Binaries for the Cygwin environment. For these, please see the normal
|
||||
INSTALL file.
|
||||
make install
|
||||
|
||||
===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user