Repository navigation
Expand file tree
/
Copy pathbuild_win32
More file actions
126 lines (86 loc) · 4.25 KB
/
Copy pathbuild_win32
File metadata and controls
126 lines (86 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
=======================================
Building IQmol From Source on Windows
=======================================
Libraries
~~~~~~~~~
Most of the work required in compiling IQmol is setting up the required
libraries. The compilation of the code should be relatively straightforward.
o Download the Qt libraries from http://www.qt.io
The latest version tested is 5.x.x. Qt provides a command prompt that sets
up the required environment (path, etc). All compilation (unless otherwise
stated) should be performed in one of these prompts to ensure a native
Windows binary is produced without any linking to cygwin libraries.
o Ensure gfortran is installed, installer packages can be found at
https://gcc.gnu.org/wiki/GFortranBinaries
o Cmake will be required to compile some of the libraries, the installer can
be obtained from http://www.cmake.org/download/
o The MinGW/MSYS environment needs to be set up. See
http://www.mingw.org/wiki/Getting_Started
for details on how to download the installer and install the developement
environemnt.
o I followed the instructions on http://gaia-gis.it/gaia-sins/mingw_how_to.html
to install libz, libxml2 and openssl. The relevant libraries should be installed
in C:\MinGW\msys\1.0\local\lib
o LibSSH2:
- Download: http://www.libssh2.org (version 1.6.0)
- Compile (inside C:\MinGW\msys\1.0\bin\bash.exe):
./configure --with-openssl --with-libssl-prefix=/usr/local/
--without-libgcrypt --with-libz --with-libz-prefix=/usr/local
make
make install
- Note that PATH was set set as:
export PATH=/c/Program\ Files/CMake/bin:/c/MingGW/bin:/usr/bin
o OpenBabel:
- Download: http://openbabel.org/wiki/Get_Open_Babel (2.4.1)
- It is important to compile the OpenBabel libraries with the same
tool chain as IQmol (i.e. the one distributed with Qt), otherwise
you can encounter ABI incompatibilities. I added the following to
openbabel-2.4.1/CMakeLists.txt:
set(CMAKE_CXX_COMPILER C:/Qt/Qt5.8.0/Tools/mingw530_32/bin/g++.exe)
set(CMAKE_C_COMPILER C:/Qt/Qt5.8.0/Tools/mingw530_32/bin/gcc.exe)
set(CMAKE_MAKE_PROGRAM C:/Qt/Qt5.8.0/Tools/mingw530_32/bin/mingw32-make.exe)
set(ZLIB_INCLUDE_DIR C:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include)
set(ZLIB_LIBRARY C:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/lib/libz.a)
make sure these values are carried over into the CMakeCache file.
- Compile a satic library with
#> cmake ../ -G "MinGW Makefiles" -DBUILD_SHARED=FALSE
#> mingw32-make
- I have not built it with xml support
-DLIBXML2_INCLUDE_DIR=/usr/local/include
-DLIBXML2_LIBRARIES=/usr/local/lib/libxml2.a
o QGLViewer:
- This has now been bundled with IQmol to reduce the number of dependencies,
but the following may still be useful:
- Download: http://libqglviewer.com/download.html
- Compile (inside C:\MinGW\msys\1.0\bin\bash.exe):
mkdir build && cd build
cmake ../ -G "MinGW Makefiles"
mingw32-make
- Note that /usr/bin needs to be removed from PATH as above
o Boost:
- Download: http://sourceforge.net/projects/boost/files/boost/1.59.0/
Later versions of boost seem to have removed support for the mingw option.
- Compile (inside the Qt cmd prompt):
bootstrap.bat mingw
.\b2 toolset=gcc
Compilation
~~~~~~~~~~~
o Use the cmd.exe prompt to compile symmol.o, maybe setting the path first
path %PATH%;C:\MinGW\bin
o Compile the SymMol object file in src/Main
mingw32-gfortran -c symmol.f90
o Compile the remaining IQmol source
qmake IQmol.pro
make
Other
~~~~~
o Distribution Version: Windows
- Copy the Openbable directory containging the plugin source into the
IQmol/src directory. IQmol.pro includes this for Windows and is required
because I can't get the plugins compiled properly.
- Copy the symmol.o file from a previous build into src. I have no idea how
I compiled this now.
- run qmake -win32 -o Makefile IQmol.pro
- make
- If memory is exhausted, debugging symbols can be stripped using strip -g lib*.a
- for some reason common.pri needs to be added to IQmol/IQmol.pro after the libraries