Fantastic, thanks! Works great.

I also found the clearly semicolon: clearly you're getting too used to 
julia...

simon

On Wednesday, 9 April 2014 19:00:55 UTC+1, Isaiah wrote:
>
> try this:
>
> #include <boost/math/special_functions/gamma.hpp>
>
> extern "C" {
>
> double bst_gamma_p_dbl_dbl(double a, double z) {
>   return boost::math::gamma_p(a, z)
> }
>
> }
>
> compile with:  g++ -shared -fPIC test.cpp -o test -lboost_math_... 
> (whichever version you have).
>
> and then call from Julia with ccall( (:bst_gamma_p_dbl_dbl, bstwraplib), 
> Cdouble, (Cdouble, Cdouble), a, z)
>
> On Wed, Apr 9, 2014 at 1:24 PM, Simon Byrne <simon...@gmail.com<javascript:>
> > wrote:
>
>> I would like to call a small number of boost functions from julia for the 
>> purposes of comparison, in particular the incomplete gamma functions:
>>
>> http://www.boost.org/doc/libs/1_55_0/libs/math/doc/html/math_toolkit/sf_gamma/igamma.html
>>
>> As I understand from previous discussions, the template-heavy nature of 
>> boost means that these can't be called using clang.jl. Could anyone tell me 
>> how I might go about writing a C wrapper for one of these functions, so 
>> that I can call them from julia? 
>>
>> thanks,
>> Simon
>>
>
>

Reply via email to