Java SWIG bindings OS X Compilation 2.2.7 source

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Java SWIG bindings OS X Compilation 2.2.7 source

Swetnam, James
I recently had to do some troubleshooting to compile the JNI bindings for openbabel.  I’d like to suggest a couple of tweaks to the README file for compilation for the OS X platform (At least on snow leopard 10.6.x).   It currently reads:

*** Mac OS X Compilation

As for Linux, but use the following instructions to compile the bindings. Also, replace LD_LIBRARY_PATH with DYLD_LIBRARY_PATH.

% g++ -c -I/System/Library/Frameworks/JavaVM.framework/Headers \
openbabel_java.cpp
% g++ -dynamiclib -o libopenbabel.jnilib openbabel_java.o \
-framework JavaVM -L/usr/local/lib -lopenbabel

To get the OBTest class working properly, I had to use these commands:

g++ -c -I../../include -I/System/Library/Frameworks/JavaVM.framework/Headers openbabel_java.cpp

(same as above but with openbabel’s header directory included, suggested by “as for linux, but use the following instructions..”, but perhaps not totally clear, at least to me.)

And for the library on mac (since the user may not have installed openbabel lib files to /usr/local/lib, also obtest tries to load System.loadLibrary("openbabel_java");):

g++ -dynamiclib -o libopenbabel_java.jnilib openbabel_java.o -framework JavaVM -L$OB_LIBDIR –lopenbabel


James Swetnam
Lead Scientific Programmer
Dept. of Pharmacology
NYU Langone Medical Center
550 First Ave
MSB 497-C
New York, NY 10016
Tel: (212)-263-8155

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Java SWIG bindings OS X Compilation 2.2.7 source (Correction- 2.2.3)

Swetnam, James

My apologies, I was using the 2.2.3 source

On 9/16/10 2:55 PM, "Swetnam, James" <[hidden email]> wrote:

I recently had to do some troubleshooting to compile the JNI bindings for openbabel.  I’d like to suggest a couple of tweaks to the README file for compilation for the OS X platform (At least on snow leopard 10.6.x).   It currently reads:

*** Mac OS X Compilation

As for Linux, but use the following instructions to compile the bindings. Also, replace LD_LIBRARY_PATH with DYLD_LIBRARY_PATH.

% g++ -c -I/System/Library/Frameworks/JavaVM.framework/Headers \
openbabel_java.cpp
% g++ -dynamiclib -o libopenbabel.jnilib openbabel_java.o \
-framework JavaVM -L/usr/local/lib -lopenbabel

To get the OBTest class working properly, I had to use these commands:

g++ -c -I../../include -I/System/Library/Frameworks/JavaVM.framework/Headers openbabel_java.cpp

(same as above but with openbabel’s header directory included, suggested by “as for linux, but use the following instructions..”, but perhaps not totally clear, at least to me.)

And for the library on mac (since the user may not have installed openbabel lib files to /usr/local/lib, also obtest tries to load System.loadLibrary("openbabel_java");):

g++ -dynamiclib -o libopenbabel_java.jnilib openbabel_java.o -framework JavaVM -L$OB_LIBDIR –lopenbabel


James Swetnam
Lead Scientific Programmer
Dept. of Pharmacology
NYU Langone Medical Center
550 First Ave
MSB 497-C
New York, NY 10016
Tel: (212)-263-8155


------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Java SWIG bindings OS X Compilation 2.2.7 source (Correction- 2.2.3)

Swetnam, James
I took the liberty of changing the wiki page to reflect these new
instructions.

Best
James

On 9/16/10 3:04 PM, "Swetnam, James" <[hidden email]> wrote:

>
> My apologies, I was using the 2.2.3 source
>
> On 9/16/10 2:55 PM, "Swetnam, James" <[hidden email]> wrote:
>
> I recently had to do some troubleshooting to compile the JNI bindings for
> openbabel.  I¹d like to suggest a couple of tweaks to the README file for
> compilation for the OS X platform (At least on snow leopard 10.6.x).   It
> currently reads:
>
> *** Mac OS X Compilation
>
> As for Linux, but use the following instructions to compile the bindings.
> Also, replace LD_LIBRARY_PATH with DYLD_LIBRARY_PATH.
>
> % g++ -c -I/System/Library/Frameworks/JavaVM.framework/Headers \
> openbabel_java.cpp
> % g++ -dynamiclib -o libopenbabel.jnilib openbabel_java.o \
> -framework JavaVM -L/usr/local/lib -lopenbabel
>
> To get the OBTest class working properly, I had to use these commands:
>
> g++ -c -I../../include -I/System/Library/Frameworks/JavaVM.framework/Headers
> openbabel_java.cpp
>
> (same as above but with openbabel¹s header directory included, suggested by
> ³as for linux, but use the following instructions..², but perhaps not totally
> clear, at least to me.)
>
> And for the library on mac (since the user may not have installed openbabel
> lib files to /usr/local/lib, also obtest tries to load
> System.loadLibrary("openbabel_java");):
>
> g++ -dynamiclib -o libopenbabel_java.jnilib openbabel_java.o -framework JavaVM
> -L$OB_LIBDIR ­lopenbabel
>
>
> James Swetnam
> Lead Scientific Programmer
> Dept. of Pharmacology
> NYU Langone Medical Center
> 550 First Ave
> MSB 497-C
> New York, NY 10016
> Tel: (212)-263-8155
>
>
> ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the
> intended recipient(s) and may contain information that is proprietary,
> confidential, and exempt from disclosure under applicable law. Any
> unauthorized review, use, disclosure, or distribution is prohibited. If you
> have received this email in error please notify the sender by return email and
> delete the original message. Please note, the recipient should check this
> email and any attachments for the presence of viruses. The organization
> accepts no liability for any damage caused by any virus transmitted by this
> email.
> =================================
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss