This part is covered in the docs at least. You are missing eigen.
On 5 Oct 2016 6:02 p.m., "Jason Ott" <jott...@ucr.edu> wrote:
> That worked like a charm! Thanks. So now I have been trying to include
> said java bindings in my project...
>
> I added the openbabel.jar file to my classpath. So I can import and all
> classes are resolved and looking good! However, when I try running the
> basic program from the tutorial
> <http://openbabel.org/docs/dev/UseTheLibrary/Java.html#quickstart-example> my
> System.loadLibrary("openbabel_java") throws a segfault from native up to
> my java.
>
> I tried to follow the readme in the /scripts/java/ directory, but I cannot
> get the very first compilation step to work. But I noticed that under
> [install_path]/lib/ there is both the openbabel.jar and
> libopenbabel_java.jnilib, which should be enough to get the thing working.
>
> When I follow that readme in /scripts/java/ I get the following error:
>
> openbabel-java.cpp:9941:25: error: no member named 'DiverseConfGen' in
> 'OpenBabel::OBForceField'
>
> result = (int)(arg1)->DiverseConfGen(arg2,arg3,arg4,arg5); jresult =
> (jint)result; return jresult; }
>
> ~~~~~~ ^
>
> openbabel-java.cpp:9946:25: error: no member named 'DiverseConfGen' in
> 'OpenBabel::OBForceField'
>
> result = (int)(arg1)->DiverseConfGen(arg2,arg3,arg4); jresult =
> (jint)result; return jresult; }
>
> ~~~~~~ ^
>
> openbabel-java.cpp:9950:54: error: no member named 'DiverseConfGen' in
> 'OpenBabel::OBForceField'
>
> arg3 = (unsigned int)jarg3; result =
> (int)(arg1)->DiverseConfGen(arg2,arg3);
> jresult = (jint)result; return jresult; }
>
> ~~~~~~ ^
>
> openbabel-java.cpp:9954:25: error: no member named 'DiverseConfGen' in
> 'OpenBabel::OBForceField'
>
> result = (int)(arg1)->DiverseConfGen(arg2); jresult = (jint)result;
> return jresult; }
>
> ~~~~~~ ^
>
> 4 errors generated.
>
>
> I compile with the following command: g++ -c -fpic openbabel-java.cpp -I
> ../../include/ -I
> /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/include/
> -I /Library/Java/JavaVirtualMachines/jdk1.8.0_
> 60.jdk/Contents/Home/include/darwin/ -I /opt/local/include/eigen3/
>
>
> Any support would be appreciated. Thanks.
>
> On Wed, Oct 5, 2016 at 6:48 AM, Noel O'Boyle <baoille...@gmail.com> wrote:
>
>> Ah -- looks like we missed something in the release. The Swig bindings
>> should have been included. As it is, you will need to install swig,
>> and specify -DSWIG_EXECUTABLE=whatever.
>>
>> - Noel
>>
>> On 5 October 2016 at 01:10, Jason Ott <jott...@ucr.edu> wrote:
>> > Hello all!
>> >
>> > I have been trying all day to build the java bindings for open babel. I
>> > have:
>> >
>> > installed through mac ports,
>> > downloaded source and compiled using the following flags:
>> >
>> > -DCMAKE_INSTALL_PREFIX=~/Applications/openbabel -DJAVA_BINDINGS=ON
>> > -DBUILD_GUI=OFF
>> >
>> > I am running MacOS Sierra. No special configs or anything. The java
>> > bindings are never generated in the openbabel-openbabel-2.4.0/scri
>> pts/java/
>> > folder or anywhere in the installation location.
>> >
>> > When I do the "cmake ./ -DCMAKE_INSTALL_PREFIX=~/Applications/openbabel
>> > -DJAVA_BINDINGS=ON -DBUILD_GUI=OFF" I get the following output:
>> >
>> > -- Using included inchi library.
>> > -- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
>> > wxWidgets_INCLUDE_DIRS)
>> > -- Checking available shared pointer...
>> > -- Use std::shared_ptr in memory
>> > -- Cairo found. PNG output will be supported.
>> > -- GUI will not be built
>> > -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
>> > -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) (Required
>> is at
>> > least version "2.0")
>> > -- SWIG 2.0 NOT found
>> > -- Configuring done
>> > -- Generating done
>> > -- Build files have been written to:
>> > /Users/jason/Desktop/openbabel-openbabel-2-4-0
>> >
>> > So that tells me that that java AND python bindings should exist
>> *somewhere*
>> > but they don't.
>> >
>> > Thanks,
>> >
>> > Jason
>> >
>> > ------------------------------------------------------------
>> ------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > OpenBabel-discuss mailing list
>> > OpenBabel-discuss@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>> >
>>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss