On Aug 10, 5:58 pm, Frederick Polgardy <f...@polgardy.com> wrote:
> Access to C/C++ is only available via JNI, which requires a bit of technical 
> understanding about the Java-C bridge. Are you just trying to make use of a 
> C++ library you already have, for which there is no pure Java equivalent?

When using clj-native no JNI code is needed. It is a wrapper for JNA
which does the JNI bit for you.

To answer Sunil: No, C++ is not possible (at least not trivially)
because it has no defined naming standard and binary layout of classes
across compiler implementations. So right now only C is supported. In
order to use C++ you will have to make C wrappers for the C++ code you
want to use.

It is certainly theoretically possible to call C++ from Clojure/Java
but it requires deep knowledge and lots of code for each C++ compiler
one would like to support.

>
> -Fred
>
> --
> Science answers questions; philosophy questions answers.
>
> On Aug 10, 2010, at 6:29 AM, Sunil S Nandihalli wrote:
>
>
>
> > Thanks Mac for your clarification .. I am using clojure 1.2 .. so should be 
> > fine. And I was wondering if I can acess c++ stuff via clj-native .. What 
> > are your suggestions?
> > Sunil
>
> > On Tue, Aug 10, 2010 at 12:45 PM, mac <markus.gustavs...@gmail.com> wrote:
> > I'm the author of clj-native.
> > Currently it only works with Clojure 1.2. In retrospect I should have
> > made a separate branch when dropping 1.1 support.
> > If you need 1.1 support, just tell me and I could make a branch for it
> > since the changes required should be small.
>
> > /Markus
>
> > On Aug 9, 5:31 pm, Chouser <chou...@gmail.com> wrote:
> > > On Mon, Aug 9, 2010 at 10:55 AM, Sunil Nandihalli
>
> > > <sunil.nandiha...@gmail.com> wrote:
> > > > Hello everybody,
> > > >  I have been trying to use the native libraries in clojure. I have
> > > > found clj-native and clojure-jna which may serve the purposes. I would
> > > > like to get a feed back from the community .. Which of these is good
> > > > to use .. Or do you have any other suggestions..
>
> > > I wrote clojure-jna, but although I haven't had a chance to use
> > > clj-native yet I understand it's significantly more advanced and
> > > efficient than clojure-jna.  So I'd recommend at least starting with
> > > clj-native to see if it will meet your needs.
>
> > > --Chouserhttp://joyofclojure.com/
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to