Hi Leon,

While I don’t recommend this because of how “hacky” it is, on Linux it's 
possible to use the headers and library files that come with the Anaconda 
distribution. To do so you could point the compiler and linker to the files 
within your RDKit Anaconda environment. If you use GCC this means adding the 
following arguments to your command line (adjust the file path to your Anaconda 
environment directory):

-I/home/user/anaconda3/envs/rdkit/include/rdkit/ 
-L/home/user/anaconda3/envs/rdkit/lib/

However, if you already have some of the RDKit’s dependencies installed in your 
system, you will have to be extra careful to avoid conflicts between different 
versions of them, since the RDKit's dependencies’ library files are also in the 
same directory. Additionally, as far as I’m aware, this won’t work on Windows 
because the Windows Anaconda distribution doesn’t ship with all the headers and 
libraries.

Given how common questions and issues regarding building the RDKit are I think 
it would be very helpful to create a C++ RDKit distribution within some package 
manager. I personally like vcpkg (https://github.com/microsoft/vcpkg). It’s 
open-source, cross-platform and, much like Anaconda, you can download and 
install a package of interest and all its dependencies with a single command. I 
believe it also builds on CMake, so creating a port for the RDKit should be 
possible.

Best regards,
Alan

From: topgunhaides<mailto:sunzhi....@gmail.com>
Sent: 21 July 2020 18:43
To: RDKit Discuss<mailto:rdkit-discuss@lists.sourceforge.net>
Subject: [Rdkit-discuss] RDKit installation for C++

Hello guys,

Working on transferring my entire RDKit Python code to C++. Before testing new 
code, I need to make it working with C++...

Not experienced with it, so I got a couple of questions about the installation:
1. My Conda RDKit works well with Python on Linux. Do I have to install a new 
"C++ version" of RDKit? If not, how can I link it to the current Conda RDKit?
2. If I need to reinstall it for C++ purpose, do I have to build it from 
source? I have my cmake and gcc up-to-date on linux.
3. I can try the Windows Installation using RDKit binaries, but same question 
here: does it work fully with C++?

Can anyone offer some help? Thanks a lot!

Best,
Leon


_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to