Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?

Building libhelium on Windows 2012 server R2

First, get Visual C++ 2010 Express and install it:

Install cmake for windows (get the windows installer):

Install python for windows (I've only tested with 2.7.x):

Make sure when installing python to enable the 'Add python.exe to Path' option in the installer.

Install git for windows:

Make sure you check 'Use Git from the Windows Command Prompt' in the installer.

Download precompiled openssl binaries from here:

Make sure you get the latest 1.0.1 (or later) built with MSVC 2010. You will need 7-zip from to extract the archive, if you don't already have it. Extract the archive somewhere.

At this point, just reboot to get all the path changes to apply.

Download a source zip of libuv:

(A later tag of libuv may be available, you can probably use that instead)

Unzip the libuv archive somewhere.

Open a cmd.exe window or powershell cd into the libuv directory and run 'vcbuild.bat'

If it fails to git clone you can do it manually over http:

cd build
git clone
cd ..

Libuv will build.

Now, download libhelium source archive:

Extract that somewhere, and then run CMake (cmake-gui) (can be found in the start menu). Use the 'Browse source' button to browse to the libhelium directory. Use the 'Browse Build' directory to browse to the libhelium directory, but add a 'build' directory on the end of the path. Then press the 'Configure' button. Tell it yes when it asks to create the build directory. A popup asking for the 'generator for this project' will appear, select 'Visual Studio 2010' and hit 'Finish'. You will get some errors about libuv paths being NOTFOUND. Click on UV_INCLUDE_DIR and browse to the directory you extracted libuv to and select the 'include' folder. For UV_LIBRARIES browse to Debug/lib/libuv under the libuv directory to pick the library to link against.

Hit the 'Configure' button again, now some errors about OpenSSL will pop up. For OPENSSL_INCLUDE pick the path you extracted openssl to and select the 'include' subdirectory. For OPENSSL_LIBRARIES pick lib/ssleay32MDd.lib in the openssl directory. Run 'Configure' again. You'll get some new errors, this time about CRYPTO_INCLUDE_DIR and CRTPTO_LIBRARIES. For CRYPTO_INCLUDE_DIR use the same path as OPENSSL_INCLUDE_DIR for CRYPTO_LIBRARIES pick libeay32MDd.lib in the same directory as the OPENNSSL_LIBRARY's ssleay32MDd.lib.

Now run Configure and Generate again, you should not get any errors.

Now, browse to the libhelium directory and go into the 'build' directory. Open 'libhelium.sln' in visual studio 2010. You should now be able to 'build' the 'ALL_BUILD' target by right clicking on it. All 5 subprojects should build. Now copy libeay32MDd.dll and ssleay32MDd.dll into your libhelium build/Debug directory and you should be able to run shell.exe and multiloop_test.exe. If those run, you have successfully built libhelium.

Copy link

jaredmorrow commented Oct 30, 2014

Please move the "Make sure when installing python to enable the 'Add python.exe to Path' option in the installer." to under the python installer line, rather than under Git.

Copy link

jaredmorrow commented Oct 30, 2014

For openssl, you need to select the "openssl" directory in the "include" directory at this line:

" extracted openssl to and select the 'include' subdirectory."

Copy link

jaredmorrow commented Oct 30, 2014

Specify "openssl/bin" as the directory to find those .dll's in the last step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment