Hi Elliot,

Thanks for the offer.

 > B) You want to write a wrapper that sits between Julia and the C++,
   written in C but used by Julia

Yes. Writing the wrapper is not the problem. Really what I'd like to
know is how to organize, compile and link C code. How do I find the
toplevel of the package directory ? How does BinDeps find the
information to write into deps.jl ? Ideally, I would have BinDeps do
all of it, as it does for the downloaded code, because, then I don't
have to know any details. But the C code is stored locally, in the
package. It doesn't need to be downloaded.  I could easily solve the
problem by putting the .c file in another git repo so that it needs to
be downloaded. But, thats not the correct solution. Since BinDeps is
not really documented, I have been searching packages at random,
looking for examples for c code and uses of BinDeps.

--John

On 12/24/2014 06:37 AM, Elliot Saba wrote:
Hey John,
>
> If you can explain a bit as to what you want to do with your libraries, that would help. What I understand from you so far is that:
>
> A) You have to C++ libraries that you are able to download and compile
>

>
> Is that correct?
> -E
>
> On Tue, Dec 23, 2014 at 5:43 PM, <lapeyre.math1...@gmail.com> wrote:
>
> Can someone point me to examples of C code in Julia packages ? I am using BinDeps to download two C++ libraries. After a lot of blind trial and error I have a build.jl that does what I need. But, I need to write a c wrapper for the C++ libraries. One idea is to have BinDeps handle the build, if I can fool it into thinking it is an external library. But, I don't know how to do that. BinDeps seems to want to download something. I find it rather opaque. Otherwise I need to find a way to write most of what BinDeps does by hand for my C code: find paths to top level of the package and various sub dirs; do change dirs, making, copying, linking at run time, etc. I spent quite a bit of time searching julia-user, and -dev, grepping and finding in package trees, reading docs and source code, etc. no luck. Thanks.
>
>     --John
>
>


Reply via email to