Building Orthanc with Visual Studio 2013

All,
I was able to successfully build Orthanc on Windows 7 x64 with Visual Studio 2013. Here are some notes:

  1. The CMAKE rule for detecting 7Zip failed despite me having it installed. I believe this is due to me installing the 64 bit version of 7Zip which puts it in C:\Program Files and CMAKE is looking for it in C:\Program Files (x86). I fixed this by changing line 18 in DownloadPackage.cmake so it would look for both the 32 bit and 64 bit versions of 7ZIP:

find_program(ZIP_EXECUTABLE 7z PATHS “$ENV{ProgramFiles}/7-Zip” “$ENV{ProgramW6432}/7-Zip”)

  1. glog failed to compile as it has not been updated to support the changes in Visual Studio 2013. Fixed by adding the following at line 57 in logging.cc:

#include

A fix for this was submitted on Aug 18,2014 so this fix will eventually not be needed (once they release a new version and Orthanc upgrades to it). Here is a link to the bug report:

https://code.google.com/p/google-glog/issues/detail?id=212

  1. Linker errors due to CoreLibrary defining _strtoll. Fixed by adding a version check to the ifdef in Toolbox.cpp line 78:

#if _MSC_VER < 1800

Hello,

Many thanks for these patches: As I use the Express version of Visual Studio, I do not have access to the 64bit compilation.

I have just included them included in the mainline:
https://code.google.com/p/orthanc/source/detail?r=929bf8c2123db590cdd30e03a37fc6b66da15c11

Cheers,
Sébastien-

Awesome, Glad I could help! Just to clarify - my OS is 64 bit but I was building the 32 bit version of Orthanc.

One other thing - I am using cmake-gui on Windows to generate the solution. I have to check “STATIC_BUILD” and “ALLOW_DOWNLOADS” for it to work. You may want to add this to the build documentation in case someone else runs into the same problem.

Thanks, just upgraded the build instructions:
http://goo.gl/bcoFje