The project was build using Microsoft Visual Studio Enterprise 2015 version 14.0.25431.01 Update 3 on 64-bit windows 10 machine for 32-bit Excel, which is part of Microsoft Office Professional Plus 2013 (Excel information can be found in File> Account> About Excel).

Visual Studio Project Parameters (The project path C:\Projects\vs\ should be modified accordingly. Check also the path to java lib folder and Windows SDK libraries folder on your machine and set them accordingly).

The project was rebuild using Visual Studio 15 with the following configuration parameters (Debug> Xlloopkr properties):

General
  1. Debug/Release: x86. (Note that the project can also be built using x64 option but the produced xll file will not be recognized by Excel as a proper excel addin library).

  2. Platform: win32. If x64 platform is selected, the produced addin was recognized by Excel on local machine but not when copied to other machines. (Note that the Linker> Input> Additional Dependencies xlcall32.lib library switches automaically to xlcall32-x64.lib library version, if x64 platform is selected, and switched back to xlcall32-x86.lib version if win32 option is selected. Check that the correct library version is selected).

Configuration Parameters:
  1. General> Target Platform Version 8.1

  2. General> Target Extension: .xll

  3. General> Platform Toolset: Visual Studio 2015 (v140)

  4. General> Configuration Type: Dynamic Library (.dll)

  5. General> Character Set: Not Set

  6. VC++ Directores> Include Directories: C:\Program Files\Java\jdk1.8.0_40\include; C:\Program Files\Java\jdk1.8.0_40\include\win32;

  7. VC++ Directores> Library Directories: C:\Projects\vs\Xlloopkr-1.0.0\lib; C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64;

C/C++
  1. Code Generation> Runtime Library: Multi-threaded (/MT). If Multi-threaded DLL (/MD) option is selected, a smaller xll Excel library is produced that is recognized on the machine where it was build but not recognized when copied to other machines.

Linker
  1. General> Additional Library Directories: C:\Projects\vs\Xlloopkr-1.0.0\lib;

  2. Input> Additional Dependencies: xlcall32-x86.lib;wsock32.lib;winhttp.lib. The xlcall32-x86.lib will switch automaticall to xlcall32-x64.lib if x64 platform option is selected (and back to xlcall32-x86.lib if win32 platform is selected).

  3. Input> Module Definition File (not necessary): C:\Projects\vs\Xlloopkr-1.0.0\Xlloopkr\src\Xlloopkr.def. This is not a required option since all exported functions are declared in the Xlloopkt.cpp file. The VS builder will throw a set of warnings that the functions are exported multiple times if the definition file is also included in the xll output. (Note that an .xll excel library file is a .dll library file that must export a specific set of functions at least once to be recognized by Excel as a proper addin file).

Libraries
  1. C:\Projects\vs\Xlloopkr-1.0.0\lib\: xlcall32-x86.lib and xlcall32-x64.lib. This is x86 and x64 versions of the xlcall32 library obtained from Excel 2013 SDK: Excel 2013 XLL Software Development Kit and is discussed in xlloop notes).



Other settings
  1. Add C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64 to the PATH variable (so that VS could find rc.exe file to build the project

  2. Add (if necessary) Microsot Foundation Classes (Control Panel-> Programs and Features->Microsoft Visual Studio-> Change->Modify-> Add Microsoft Foundation Classes)



Differences from the original XLLoop project
  1. yajl library source files were added directly to the project and compiled with the project. In the original project the library was added as external library (and shall be recompiled for the new project);

  2. msvcrt.lib library is not added directly to the project library (this may be the reason why the MD compiler option failes to create the library recognized on machines other than machine where it was built).



Definitions
  1. Multi-threaded (/MT): Defines _MT so that multithread-specific versions of the run-time routines are selected from the standard header (.H) files. This option also causes the compiler to place the library name LIBCMT.LIB into the .OBJ file so that the linker will use LIBCMT.LIB to resolve external symbols. Either /MT or /MD (or their debug equivalents /MTd or /MDd) is required to create multithreaded programs. For more information see MSDN compiler options and CRT librray features.

  2. Multi-threaded DLL (/MD): Defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines are selected from the standard .H files. This option also causes the compiler to place the library name MSVCRT.LIB into the .OBJ file. Applications compiled with this option are statically linked to MSVCRT.LIB. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCRT.DLL, which must be available at run time to applications linked with MSVCRT.LIB



Typical project errors

Below is the list of typical error that were encounted during the project build stage. The issued related to XLLoop project development can be raised on the project GitHub repository https://github.com/poidasmith/xlloop/issues. The project solutions posted on github can be very helpful to identify the correct set of configuration parameters.