How can I build RDKits C# Wrappers — Visual Studio 2019 x64

1

I have followed the steps described here: https://github.com/bp-kelley/rdkit-csharp to try and create RDKits C# Wrappers.

git clone https://github.com/bp-kelley/rdkit-csharp.git
git clone https://github.com/rdkit/rdkit.git
cd rdkit-csharp
build.bat

While trying running the build.bat I've run into an error to do with creating named generators (among many others) and I'm not sure how to sort it out.

The build.bat references Visual Studio 14 and Visual Studio 14 Win64 I have tried to update this to Visual Studio 16 2019 a few different ways. It seems to say that architecture should be referenced with an -A flag, but I've had no luck setting that.

If anyone can offer any direction at all for how to build this, I'd be most grateful. I'm finding it very tricky.

CMake Error: Could not create named generator Visual Studio 16 Win64

Generators
* Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.

In case it's helpful here's more

D:\Desktop\Build\rdkit-csharp\build64>cmake -G "Visual Studio 16 Win64" -DCMAKE_INSTALL_PREFIX= -DRDK_BUILD_PYTHON_WRAPPERS=OFF -DRDK_BUILD_SWIG_WRAPPERS=ON -DRDK_BUILD_SWIG_JAVA_WRAPPER=OFF -DRDK_BUILD_SWIG_CSHARP_WRAPPER=ON -DBOOST_INCLUDEDIR="D:\Desktop\Build\rdkit-csharp\Nuget.Local/boost.1.69.0.0/lib/native/include" -DBOOST_LIBRARYDIR="D:\Desktop\Build\rdkit-csharp\Nuget.Local/lib64" -DBoost_USE_STATIC_LIBS=ON -DEIGEN3_INCLUDE_DIR="D:\Desktop\Build\rdkit-csharp\Nuget.Local/Eigen.3.3.3/build/native/include" -DRDK_INSTALL_INTREE=OFF -DCPACK_INSTALL_PREFIX=rdkit -DRDK_BUILD_THREADSAFE_SSS=ON -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_CPP_TESTS=ON -DRDK_BUILD_CAIRO_SUPPORT=ON -DCAIRO_INCLUDE_DIRS="D:\Desktop\Build\rdkit-csharp\Nuget.Local/cairo.1.12.18.0/build/native/include" -DCAIRO_LIBRARIES="D:\Desktop\Build\rdkit-csharp\Nuget.Local\cairo.1.12.18.0\build\native\lib\x64\v120\Release\dynamic\cairo.lib" ..\..\rdkit
CMake Error: Could not create named generator Visual Studio 16 Win64

Generators
* Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Visual Studio 9 2008 [arch]  = Generates Visual Studio 2008 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Borland Makefiles            = Generates Borland makefiles.
  NMake Makefiles              = Generates NMake makefiles.
  NMake Makefiles JOM          = Generates JOM makefiles.
  Green Hills MULTI            = Generates Green Hills MULTI files
                                 (experimental, work-in-progress).
  MSYS Makefiles               = Generates MSYS makefiles.
  MinGW Makefiles              = Generates a make file for use with
                                 mingw32-make.
  Unix Makefiles               = Generates standard UNIX makefiles.
  Ninja                        = Generates build.ninja files.
  Watcom WMake                 = Generates Watcom WMake makefiles.
  CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles JOM
                               = Generates CodeBlocks project files.
  CodeBlocks - Ninja           = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - MinGW Makefiles   = Generates CodeLite project files.
  CodeLite - NMake Makefiles   = Generates CodeLite project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Sublime Text 2 - MinGW Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - NMake Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files.
  Kate - MinGW Makefiles       = Generates Kate project files.
  Kate - NMake Makefiles       = Generates Kate project files.
  Kate - Ninja                 = Generates Kate project files.
  Kate - Unix Makefiles        = Generates Kate project files.
  Eclipse CDT4 - NMake Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - MinGW Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.


D:\Desktop\Build\rdkit-csharp\build64>msbuild "ALL_BUILD.vcxproj" /m /p:PlatformTarget=x64 /p:Configuration=Release /maxcpucount:4 /t:Build
Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj

D:\Desktop\Build\rdkit-csharp\build64>copy Code\JavaWrappers\csharp_wrapper\Release\RDKFuncs.dll Code\JavaWrappers\csharp_wrapper
The system cannot find the path specified.

D:\Desktop\Build\rdkit-csharp\build64>copy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj Code\JavaWrappers\csharp_wrapper
The system cannot find the path specified.
        0 file(s) copied.

D:\Desktop\Build\rdkit-csharp\build64>robocopy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp Code\JavaWrappers\csharp_wrapper\swig_csharp /E

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

  Started : 10 May 2019 23:26:05
   Source : D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
     Dest : D:\Desktop\Build\rdkit-csharp\build64\Code\JavaWrappers\csharp_wrapper\swig_csharp\

    Files : *.*

  Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30

------------------------------------------------------------------------------

2019/05/10 23:26:05 ERROR 2 (0x00000002) Accessing Source Directory D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
The system cannot find the file specified.

D:\Desktop\Build\rdkit-csharp\build64>copy D:\Desktop\Build\rdkit-csharp\\RDKit.cs  Code\JavaWrappers\csharp_wrapper\swig_csharp\RDKit.cs
The system cannot find the path specified.
        0 file(s) copied.

D:\Desktop\Build\rdkit-csharp\build64>msbuild "Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" /m /p:Configuration=Release /maxcpucount:4 /t:Build /p:Platform=AnyCPU
Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj

D:\Desktop\Build\rdkit-csharp\build64>REM build x86

D:\Desktop\Build\rdkit-csharp\build64>cd D:\Desktop\Build\rdkit-csharp\

D:\Desktop\Build\rdkit-csharp>mkdir build32

D:\Desktop\Build\rdkit-csharp>cd build32

D:\Desktop\Build\rdkit-csharp\build32>cmake -G "Visual Studio 16" -DCMAKE_INSTALL_PREFIX= -DRDK_BUILD_PYTHON_WRAPPERS=OFF -DRDK_BUILD_SWIG_WRAPPERS=ON -DRDK_BUILD_SWIG_JAVA_WRAPPER=OFF -DRDK_BUILD_SWIG_CSHARP_WRAPPER=ON -DBOOST_INCLUDEDIR="D:\Desktop\Build\rdkit-csharp\Nuget.Local/boost.1.69.0.0/lib/native/include" -DBOOST_LIBRARYDIR="D:\Desktop\Build\rdkit-csharp\Nuget.Local/lib32" -DBoost_USE_STATIC-LIBS=ON -DEIGEN3_INCLUDE_DIR="D:\Desktop\Build\rdkit-csharp\Nuget.Local/Eigen.3.3.3/build/native/include" -DRDK_INSTALL_INTREE=OFF -DCPACK_INSTALL_PREFIX=rdkit -DRDK_BUILD_THREADSAFE_SSS=ON -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_BUILD_CPP_TESTS=ON -DRDK_BUILD_CAIRO_SUPPORT=ON -DCAIRO_INCLUDE_DIRS="D:\Desktop\Build\rdkit-csharp\Nuget.Local/cairo.1.12.18.0/build/native/include" -DCAIRO_LIBRARIES="D:\Desktop\Build\rdkit-csharp\Nuget.Local\cairo.1.12.18.0\build\native\lib\Win32\v120\Release\dynamic\cairo.lib" ..\..\rdkit
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
-- The C compiler identification is MSVC 19.20.27508.1
-- The CXX compiler identification is MSVC 19.20.27508.1
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/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: D:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Catch not found in D:/Desktop/Build/rdkit/External/catch/catch
Downloading https://github.com/catchorg/Catch2/archive/v2.1.2.tar.gz...
CATCH: D:/Desktop/Build/rdkit/External/catch/catch/single_include
-- Could NOT find InChI in system locations (missing: INCHI_LIBRARY INCHI_INCLUDE_DIR)
Downloading http://www.inchi-trust.org/download/105/INCHI-1-SRC.zip...
-- Boost version: 1.69.0
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Could NOT find Boost
== Using strict rotor definition
Downloading http://sourceforge.net/projects/avalontoolkit/files/AvalonToolkit_1.2/AvalonToolkit_1.2.0.source.tar...
-- maeparser include dir set as 'maeparser_INCLUDE_DIRS-NOTFOUND'
-- maeparser libraries set as 'maeparser_LIBRARIES-NOTFOUND'
-- Could NOT find maeparser (missing: maeparser_INCLUDE_DIRS maeparser_LIBRARIES)
Downloading https://github.com/schrodinger/maeparser/archive/v1.1.tar.gz...
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.69.0

  Boost include path:
  D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include


  Could not find the following Boost libraries:

          boost_system
          boost_iostreams

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  External/CoordGen/CMakeLists.txt:39 (find_package)


-- coordgen include dir set as coordgen_INCLUDE_DIRS-NOTFOUND
-- coordgen libraries set as 'coordgen_LIBRARIES-NOTFOUND'
-- coordgen templates file set as 'coordgen_TEMPLATE_FILE-NOTFOUND'
-- Could NOT find coordgen (missing: coordgen_INCLUDE_DIRS coordgen_LIBRARIES coordgen_TEMPLATE_FILE)
Downloading https://github.com/schrodinger/coordgenlibs/archive/v1.2.2.tar.gz...
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.69.0

  Boost include path:
  D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include


  Could not find the following Boost libraries:

          boost_system
          boost_iostreams

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  Code/RDStreams/CMakeLists.txt:4 (find_package)


-- Could NOT find Boost
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.69.0

  Boost include path:
  D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include


  Could not find the following Boost libraries:

          boost_system
          boost_iostreams

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  Code/GraphMol/FileParsers/CMakeLists.txt:7 (find_package)


-- Could NOT find Boost
== Making EnumerateLibrary without boost Serialization support
== Making FilterCatalog without boost Serialization support
-- Found PythonInterp: D:/Program Files/Python36-32/python.exe (found version "3.6.3")
== Updating Filters.cpp from pains file
== Done updating pains files
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found Cairo: D:/Desktop/Build/rdkit-csharp/Nuget.Local/cairo.1.12.18.0/build/native/include
== Making SubstructLibrary without boost Serialization support
Downloading https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz...
-- Found SWIG: C:/swig/swig.exe (found version "4.0.0")
CMake Error at D:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:2147 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.69.0

  Boost include path:
  D:/Desktop/Build/rdkit-csharp/Nuget.Local/boost.1.69.0.0/lib/native/include


  Could not find the following Boost libraries:

          boost_system
          boost_iostreams

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  Code/JavaWrappers/CMakeLists.txt:43 (find_package)


-- Could NOT find Boost
SUFFIX:
JAVA_LIBS: AvalonLib;avalon_clib;RDInchiLib;Inchi;RGroupDecomposition;SubstructLibrary;MolStandardize;FilterCatalog;Catalogs;FMCS;MolDraw2D;FileParsers;SmilesParse;Depictor;SubstructMatch;ChemReactions;Fingerprints;ChemTransforms;Subgraphs;GraphMol;DataStructs;Trajectory;Descriptors;PartialCharges;MolTransforms;DistGeomHelpers;DistGeometry;ForceFieldHelpers;ForceField;EigenSolvers;Optimizer;MolAlign;Alignment;SimDivPickers;RDGeometryLib;RDStreams;RDGeneral
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.14/Modules/UseSWIG.cmake:600 (message):
  Policy CMP0078 is not set: UseSWIG generates standard target names.  Run
  "cmake --help-policy CMP0078" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

Call Stack (most recent call first):
  Code/JavaWrappers/csharp_wrapper/CMakeLists.txt:63 (SWIG_ADD_LIBRARY)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.14/Modules/UseSWIG.cmake:460 (message):
  Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
  flag.  Run "cmake --help-policy CMP0086" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.14/Modules/UseSWIG.cmake:695 (SWIG_ADD_SOURCE_TO_MODULE)
  Code/JavaWrappers/csharp_wrapper/CMakeLists.txt:63 (SWIG_ADD_LIBRARY)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "D:/Desktop/Build/rdkit-csharp/build32/CMakeFiles/CMakeOutput.log".
See also "D:/Desktop/Build/rdkit-csharp/build32/CMakeFiles/CMakeError.log".

D:\Desktop\Build\rdkit-csharp\build32>msbuild "ALL_BUILD.vcxproj" /m /p:PlatformTarget=x86 /p:Configuration=Release /maxcpucount:4 /t:Build
Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj

D:\Desktop\Build\rdkit-csharp\build32>copy Code\JavaWrappers\csharp_wrapper\Release\RDKFuncs.dll Code\JavaWrappers\csharp_wrapper
The system cannot find the path specified.

D:\Desktop\Build\rdkit-csharp\build32>copy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj Code\JavaWrappers\csharp_wrapper
        1 file(s) copied.

D:\Desktop\Build\rdkit-csharp\build32>robocopy ..\..\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp Code\JavaWrappers\csharp_wrapper\swig_csharp /E

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

  Started : 10 May 2019 23:27:02
   Source : D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
     Dest : D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\swig_csharp\

    Files : *.*

  Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30

------------------------------------------------------------------------------

2019/05/10 23:27:02 ERROR 2 (0x00000002) Accessing Source Directory D:\Desktop\Build\rdkit\Code\JavaWrappers\csharp_wrapper\swig_csharp\
The system cannot find the file specified.

D:\Desktop\Build\rdkit-csharp\build32>copy D:\Desktop\Build\rdkit-csharp\\RDKit.cs  Code\JavaWrappers\csharp_wrapper\swig_csharp\RDKit.cs
The system cannot find the path specified.
        0 file(s) copied.

D:\Desktop\Build\rdkit-csharp\build32>msbuild "Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" /m /p:Configuration=Release /maxcpucount:4 /t:Build /p:Platform=AnyCPU
Microsoft (R) Build Engine version 4.7.3056.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/05/2019 23:27:02.
     1>Project "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" on node 1 (
       Build target(s)).
     1>PrepareForBuild:
         Creating directory "bin\Release\".
         Creating directory "obj\Release\".
       CoreCompile:
         C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prom
         pt /warn:4 /define:TRACE /highentropyva- /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Fra
         mework\.NETFramework\v4.0\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micros
         oft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microso
         ft\Framework\.NETFramework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micro
         soft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Refere
         nce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Refe
         rence Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference:"C:\Program Files (x86)\Referen
         ce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Refere
         nce Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /opti
         mize+ /out:obj\Release\RDKit2DotNet.dll /target:library /utf8output
     1>CSC : warning CS2008: No source files specified [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_
       wrapper\RDKit2DotNet.csproj]
     1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3713,5): error MSB3030: Could not copy th
       e file "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKFuncs.dll" because it was not
       found. [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj]
     1>Done Building Project "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.cspro
       j" (Build target(s)) -- FAILED.

Build FAILED.

       "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" (Build target) (1)
       ->
       (CoreCompile target) ->
         CSC : warning CS2008: No source files specified [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\cshar
       p_wrapper\RDKit2DotNet.csproj]


       "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj" (Build target) (1)
       ->
       (_CopyOutOfDateSourceItemsToOutputDirectoryAlways target) ->
         C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3713,5): error MSB3030: Could not copy
       the file "D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKFuncs.dll" because it was no
       t found. [D:\Desktop\Build\rdkit-csharp\build32\Code\JavaWrappers\csharp_wrapper\RDKit2DotNet.csproj]

    1 Warning(s)
    1 Error(s)
c#
visual-studio
cmake
swig
rdkit
asked on Stack Overflow May 10, 2019 by Sarcoma • edited May 11, 2019 by Sarcoma

1 Answer

1

Try changing your cmake call to this:

cmake -G "Visual Studio 16 2019" -A x64 ... [rest of your CMake options] ...

Here is the documentation for the different platform names (architectures) you can use with VS 2019.

As the error message in your question suggests, CMake used to support specifying Win64 along with the Visual Studio version, like this: "Visual Studio 15 2017 Win64". However, they have stopped supporting that as of Visual Studio 16 2019, forcing us to use the -A x64 approach.

answered on Stack Overflow May 11, 2019 by squareskittles • edited May 11, 2019 by squareskittles

User contributions licensed under CC BY-SA 3.0