Issue with compiling sample plugins in Windows / VS 2015

Hi,

I am currently getting a bit desperate trying to compile the Storage Area sample plugin on Windows.

Using CMake and Visual Studio 2015, the CMake shows “MSVC compiler version = 1900” in red.

Loading and compiling the project in Visual Studio literally ends up in a zillion errors, mostly up to ‘wrong’ integer types (unknown int64_t etc.)

Following both the main log of CMAKE during building the project and a short section of the output while compiling in Visual Studio.

Selecting Windows SDK version 10.0.10240.0 to target Windows 10.0.17134.

The C compiler identification is MSVC 19.0.24215.1

The CXX compiler identification is MSVC 19.0.24215.1

Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe

Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe – works

Detecting C compiler ABI info

Detecting C compiler ABI info - done

Detecting C compile features

Detecting C compile features - done

Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe

Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe – works

Detecting CXX compiler ABI info

Detecting CXX compiler ABI info - done

Detecting CXX compile features

Detecting CXX compile features - done

Found PythonInterp: C:/Users/Knut/AppData/Local/Programs/Python/Python37-32/python.exe (found version “3.7.2”)

MSVC compiler version = 1900

Configuring done

1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(340): error C3646: “groupsCount”: Unbekannter Überschreibungsspezifizierer
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(340): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(350): error C3646: “getCount”: Unbekannter Überschreibungsspezifizierer
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(350): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(370): error C3646: “bodySize”: Unbekannter Überschreibungsspezifizierer
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(370): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(380): error C3646: “headersCount”: Unbekannter Überschreibungsspezifizierer
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(380): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
1>C:\Users\Knut\Documents\Visual Studio 2015\Projects\Orthanc-1.5.1\Plugins\Include\orthanc/OrthancCPlugin.h(895): error C3646: “size”: Unbekannter Überschreibungsspezifizierer

I also took the plugin.cpp of the Area Storage plugin and compiled it seperately (just with the required headers linked) → this is working, but I get an Error 193 when starting Orthanc with the dll (64/32 bit issue?)

Could someone provide me the information in which environment (VC version, etc.) the binaries have been compiled to reproduce it? Getting a bit desperate, currently.

Thank you!

Hello,

Build instructions for Visual Studio are available in the following file:
https://bitbucket.org/sjodogne/orthanc/src/Orthanc-1.5.1/INSTALL

You have to use the “CMakeLists.txt” that is at the root of the project, i.e. the one that will also build Orthanc (not those that are inside the “Plugins” folder):
https://bitbucket.org/sjodogne/orthanc/src/Orthanc-1.5.1/CMakeLists.txt

Our continuous integration servers run both Visual Studio 2008 32bit and Visual Studio 2015 64bit.

HTH,
Sébastien-

Thank you Sébastien
Sorry, must have overlooked that file - will get myself worked thru it now …