Installation




Installation for Windows


We encourage users to download and use XtalOpt pre-compiled from here. In fact, we do not provide a complete set of compilation instructions for Windows. However, you may continue reading if you wish to attempt to compile XtalOpt on your own.


First and foremost, a C++ compiler with C++11 is required to compile XtalOpt. MSVC >=2015 will work. One important point to remember when compiling for Windows is that you must use the same compiler for every dependency. So if MSVC 2017 64-bit Release is to be used for XtalOpt, all of the dependencies must be compiled with MSVC 2017 64-bit Release.

Similar to the compilations for the other operating systems, the following dependencies are required:

For git and cmake, only the executables are used, so you may download them from their respective websites.

For Qt, you may either download pre-compiled binaries for your specific compiler or compile it yourself. Qt typically has compiled versions for just about every compiler, so if you choose to download it, be sure to pick the compiled version that matches your compiler.

Eigen is a header-only library, so it does not need to be compiled separately.

OpenSSH, LibSSH, and Qwt need to all be compiled with your compiler of choice, but we do not provide instructions for that. You must use their instructions to do so.

Compiling XtalOpt

Once you have compiled all of the binaries, you need to run cmake with the locations of all of the dependencies defined. An example of this for MSVC can be found in the batch file in scripts/cmake-msvc.bat file in the XtalOpt repository. Afterwards, you must run "make" (or "nmake" in the case of MSVC) in the build directory. If the cmake option "-DBUILD_INDEPENDENT_PACKAGE" was used, a "make install" (or "nmake install" in the case of MSVC) will install XtalOpt and all of its dependencies into your cmake install directory.

If the compilation was successful, the installed xtalopt.exe executable may be ran. It will only run successfully if all of the .dll dependencies are found, though, so you may need to manually find and place all of the .dll dependencies into the directory with XtalOpt.