Skip to content

Commit 08c512d

Browse files
committed
Make Windows compilation instructions more prescriptive
1 parent bcf8ff3 commit 08c512d

File tree

1 file changed

+25
-32
lines changed

1 file changed

+25
-32
lines changed

COMPILING.md

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ environments:
77
- MacOS X
88
- Solaris 11
99
- FreeBSD 11
10-
- Cygwin (We recommend the i686-pc-mingw32-g++ cross compiler, version 5.4 or
11-
above.)
12-
- Microsoft's Visual Studio version 12 (2013), version 14 (2015), or version 15
13-
(older versions won't work)
10+
- Cygwin
11+
- Microsoft Visual Studio
1412

1513
The rest of this document is split up into three parts: compilation on Linux,
1614
MacOS, Windows. Please read the section appropriate for your machine.
@@ -119,42 +117,37 @@ Follow these instructions:
119117

120118
# COMPILATION ON WINDOWS
121119

122-
There are two options: compilation using g++ from Cygwin, or using Visual
123-
Studio's compiler. As Cygwin has significant overhead during process creation,
124-
we advise you use Visual Studio.
120+
There are two options: the Visual Studio compiler with version 12 (2013) or
121+
later, or the MinGW cross compiler with version 5.4 or later.
122+
We recommend Visual Studio.
125123

126124
Follow these instructions:
127125

128-
1. You need a C/C++ compiler, Flex and Bison, GNU tar, gzip2, GNU make, and
129-
patch. The GNU Make needs to be version 3.81 or higher. If you don't
130-
already have the above, we recommend you install Cygwin.
131-
2. You need a SAT solver (in source). We recommend MiniSat2. Using a
132-
browser, download from
126+
1. First install Cygwin, then from the Cygwin setup facility install the
127+
following packages: `flex, bison, tar, gzip, git, make, wget, patch`.
128+
2. Get the CBMC source via
133129
```
134-
http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
135-
```
136-
and then unpack with
137-
```
138-
tar xfz minisat-2.2.1.tar.gz
139-
mv minisat minisat-2.2.1
140-
cd minisat-2.2.1
141-
patch -p1 < ../scripts/minisat-2.2.1-patch
130+
git clone https://github.com/diffblue/cbmc cbmc-git
142131
```
143-
The patch removes the dependency on zlib and prevents a problem with a
144-
header file that is often unavailable on Windows.
145-
1. To compile with Cygwin, install the mingw compilers, and adjust
146-
the second line of config.inc to say
147-
```
148-
BUILD_ENV = MinGW
149-
```
150-
2. To compile with Visual Studio, make sure you have at least Visual
151-
Studio version 12 (2013), and adjust the second line of config.inc to say
132+
3. Depending on your choice of compiler:
133+
1. To compile with Visual Studio, change the second line of config.inc to
152134
```
153135
BUILD_ENV = MSVC
154136
```
155-
Open the Visual Studio Command prompt, and then bash.exe -login from
156-
Cygwin from in there.
157-
3. Type cd src; make - that should do it.
137+
Open the Developer Command Prompt for Visual Studio, then start the
138+
Cygwin shell with
139+
```
140+
bash.exe -login
141+
```
142+
2. To compile with MinGW, use Cygwin setup to install a mingw g++ compiler
143+
package, i.e. one of `mingw{32,64}-{x86_64,i686}-gcc-g++`. Then start
144+
the Cygwin shell.
145+
4. In the Cygwin shell, type
146+
```
147+
cd cbmc-git/src
148+
make DOWNLOADER=wget minisat2-download
149+
make
150+
```
158151
159152
(Optional) A Visual Studio project file can be generated with the script
160153
"generate_vcxproj" that is in the subdirectory "scripts". The project file is

0 commit comments

Comments
 (0)