Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Brian Kelley
One thing we could fairly easily set up is a "companion" CMakeLists.txt for a sample C++ project that builds a test project against a built distribution. It could prove useful as a basis for building C++ extensions. Basically we would hedge our bets and just link against everything :) Cheers,

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Yingfeng Wang
Brian, I think this is a good idea. Basically, I want to address the following two situations: 1) A user wants to compile my C++ source code. I want to provide my source code and Makefile, and remind to install RDKit first (I don't think we need to mention boost, which is required by RDKit). 2)

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Peter S. Shenkin
Well, it's inelegant. But as my post-doc advisor, Cy Levinthal, once said, "Elegance is for tailors". Cheers, -P. On Wed, Mar 16, 2016 at 10:38 AM, Yingfeng Wang wrote: > Peter, > > Thanks. This is a PERFECT general solution to all of this kind of > headaches! > > Best, >

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-19 Thread Yingfeng Wang
Peter, Thanks. Do you mean -lLibA_static -lLibB_static -lLibC_static -lLibA_static -lLibB_static -lLibC_static ? So, by this way, we don't need to worry about the order of these three libraries. Best, Yingfeng On Wed, Mar 16, 2016 at 12:36 AM, Peter S. Shenkin wrote: >

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-18 Thread Peter S. Shenkin
Yes, that's exactly what I meant. I'm not sure whether this sort of thing still works in our troubled times, but it's easy enough to try. -P. On Wed, Mar 16, 2016 at 8:46 AM, Yingfeng Wang wrote: > Peter, > > Thanks. Do you mean > > -lLibA_static -lLibB_static -lLibC_static

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-18 Thread Yingfeng Wang
Peter, Thanks. This is a PERFECT general solution to all of this kind of headaches! Best, Yingfeng On Wed, Mar 16, 2016 at 10:27 AM, Peter S. Shenkin wrote: > Yes, that's exactly what I meant. I'm not sure whether this sort of thing > still works in our troubled times, but

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-16 Thread Riccardo Vianello
Hi Yingfeng, do you use cmake to build your own project? in case you did, some cmake configuration files are usually installed together with the RDKit libraries and may help manage these details: rdkit-config.cmake rdkit-config-version.cmake rdkit-targets.cmake rdkit-targets-release.cmake The

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-15 Thread Peter S. Shenkin
I'm not sure how this works with modern linkers, but "back in the old days", you could kludge it by putting all libraries on the link line twice, This also resolved circular references. -P. On Wed, Mar 16, 2016 at 12:05 AM, Greg Landrum wrote: > Though that would be

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-15 Thread Greg Landrum
Though that would be useful information, I'm afraid that's not something I've ever put together. -greg On Tue, Mar 15, 2016 at 6:26 PM, Yingfeng Wang wrote: > Greg, > > Could you please give me an order of all libraries? Say, I want to link > all RDKit static libraries. I

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-15 Thread Yingfeng Wang
Greg, Could you please give me an order of all libraries? Say, I want to link all RDKit static libraries. I know most of which could be unnecessary, but I just want to make my situation easy. So, if I cannot figure out a better plan, this way at least works. Thanks. Yingfeng On Mon, Mar 14,

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-14 Thread Greg Landrum
On Sat, Mar 12, 2016 at 5:00 AM, Yingfeng Wang wrote: > Greg, > > Thanks. Your suggestion solves my problem. I add the following part in my > compiling command. > > -L/Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib -lRDInchiLib > -lInChi -lGraphMol -lRDGeneral > >

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-12 Thread Yingfeng Wang
Greg, Thanks. Your suggestion solves my problem. I add the following part in my compiling command. -L/Users/yingfeng/software/RDKit/rdkit-Release_2015_03_1/lib -lRDInchiLib -lInChi -lGraphMol -lRDGeneral and the complete compiling command is g++ -Wall -O2 -std=c++11 -I

Re: [Rdkit-discuss] compiling error with C++ on maverick

2016-03-11 Thread Greg Landrum
Yingfeng, you have forgotten to link against the rdkit libraries. If you are using the InChI code, you need to link against: RDInchiLib, InChi, GraphMol, and RDGeneral. There may be a few others as well. -greg On Sat, Mar 12, 2016 at 5:13 AM, Yingfeng Wang wrote: >

[Rdkit-discuss] compiling error with C++ on maverick

2016-03-11 Thread Yingfeng Wang
After installing RDKit, I try to compile the following code in main.cpp, #include #include using namespace RDKit; using namespace std; int main(int argc, const char * argv[]) { string curInchi = "InChI=1S/C10H9N3O/c1-7-11-10(14)9(13-12-7)8-5-3-2-4-6-8/h2-6H,1H3,(H,11,12,14)";