Problem with entry points

View: New views
2 Messages — Rating Filter:   Alert me  

Problem with entry points

by Charles Southey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

I’ve built the Math library on Windows using bjam using this...

 

bjam toolset=msvc --with-math --build-type=complete stage

 

I’m using P/invoke to call functions from managed code in C#. Generally it works fine (e.g. functions ‘beta’ and ‘ibeta’  work well) – but some of the functional entry points don’t seem to be found (e.g. ‘ibeta_inv’).  I’ve tried using dumpbin /exports to examine the .dll but it seem to list only a subset of the total functions. Below are a couple of the c# function definitions...

 

This one works...

 

        [DllImport("boost_math_tr1-vc90-mt-1_40.dll", EntryPoint = "beta", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]

        public static extern double beta(double a, double b);

 

This one doesn’t....

        [DllImport("boost_math_tr1-vc90-mt-1_40.dll", EntryPoint = "ibeta_inv", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]

        public static extern double ibeta_inv(double a, double b, double p);

 

It gives a System.EntryPointNotFoundException saying that the entry point ‘ibeta_inv’ is not found in boost_math_tr1-vc90-mt-1_40.dll.

 

Can anyone help  ?

 

Thanks,

 

Charles


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: Problem with entry points

by Vladimir Prus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday 22 September 2009 Charles Southey wrote:

> Hi,
>
>  
>
> I've built the Math library on Windows using bjam using this...
>
>  
>
> bjam toolset=msvc --with-math --build-type=complete stage
>
>  
>
> I'm using P/invoke to call functions from managed code in C#. Generally it
> works fine (e.g. functions 'beta' and 'ibeta'  work well) - but some of the
> functional entry points don't seem to be found (e.g. 'ibeta_inv').

ibeta_inv is defined like this:

        template <class T1, class T2, class T3, class T4, class Policy>
        inline typename tools::promote_args<T1, T2, T3, T4>::type  
           ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol)

So, it's not a function, it's function template and unless it's instantiated
for specific types, you won't have anything to call.

HTH,
Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build