Hi all!
I'm (bravely) trying to build Avogadro 2 using Visual Studio 2015 and I wanted
to post on some issues I've resolved so far as well as try to get some help on
the issues I'm currently facing.
I've been working on a Windows 10 PC that I reset/wiped and completely
reinstalled VS2015 and the Windows SDK version 10.0.10586.0 to cross out any
errors being due to my install.
Some things I've noticed and changed so far:
zlib- zlib seems to build fine, however there is a post-build instruction that
is defined somewhere in the cmake files that renames zlib.lib - > zlib1.lib.
I'm not sure if this is a problem building on other platforms, but when I build
in debug mode, VS produces zlibd.lib. Then when it attempts to do the renaming
step, it will say the build failed despite zlibd.lib being correctly generated.
Building as release seems to work fine.
libxml2- At the time of this message, libxml 2.9.1 is being used as a
dependency. After much frustration it turns out that they introduced a fix for
VS2015 in version 2.9.2 involving a macro definition of "snprintf". I've since
changed it to use version 2.9.4 on my machine. While that has allowed me to
compile fine, I'm currently facing unresolved external errors during linking
which I have yet to look into.
boost- Attempting to build boost resulted in a single toolset error, which I
was able to fix by adding
"elseif(MSVC14)
set(_toolset "msvc-14.0")"
to cmake/External_boost.cmake.
HDF5- They recently changed where they were hosting their 1.8.12 source. If you
don't already have it in your downloads folder you will get a 404 error when
trying to download the source. After changing the download location and version
to 1.8.17 I still was not able to compile, but luckily they offer a binary
compiled on VS2015 which seemed to work fine.
Molequeue- Setting "CMAKE_PREFIX_PATH" was required for the required QT files
to be located.
avogadrolibs- VS2015 wasn't able to recognize the type "uint" so I had to add
"typedef unsigned int uint" at the top of poscarformat.cpp in order for this
project to compile.
These are the changes I've made so far in order to build most of the solution.
Hopefully my notes so far can help some people in a similar situation, as well
as bring up some issues that may affect others too (such as the HDF5 download
location).
Right now my build is being stopped by unresolved externals in both the libxml2
and avogadrolibs projects. I'm focusing on solving my issues with avogadrolibs
right now. The issue seems to be between AvogadroQuantumIo + Json::Value
(http://pastebin.com/nG4YYRXj) and AvogadroMoleQueue +
Avogadro::QtGui::GenericHighlighter (http://pastebin.com/XDbDfAhA).
Since I generated Visual Studio projects, I can open the Avogadrolibs solution
and confirm that these sub projects are being built with the same settings
(SDK, target machine type, etc) as well as that the locations for the .lib
files are correct. For example, for the unresolved externals in
AvogadroQuantumIo, I can build the jsoncpp project, build and correctly link it
to AvogadroIO and verify that the .lib files are there. However when trying to
link AvogadroQuantumIo and AvogadroIO the LNK 2019 errors are thrown.
If anyone has faced a similar issue and been able to resolve it or has any idea
what is wrong, any help is appreciated!
------------------------------------------------------------------------------
_______________________________________________
Avogadro-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/avogadro-devel