sanjay nayak has asked for the wisdom of the Perl Monks concerning the following question:


Hi Monks
I have downloaded the pjproject-1.0.1 from http://www.pjsip.org. I have compiled and run it successfully in Microsoft visual C++. i want to use it's modules and API to create the response for the algorithms (AKAv1-MD5 and AKAv2-MD5), which modules are not present in perl monk.

The API for the above is Digest AKAv1 and AKAv2 Authentication API.
http://www.pjsip.org/pjsip/docs/html/group__PJSIP__AUTH__AKA__API.htm
i am giving the sample of my perl code below.
#!C:\Perl\bin\perl.exe -w #Inline.pl use Inline C; __END__ __C__ #include <stdio.h> #include <E:\pjproject-1.0.1\pjlib\include\pj\config.h>

Plz suggest how can i use the libraries and the API of Pjproject in my perl program to create the response by using the algorithms AKAv1-MD5 and AKAv2-MD5.Can anyone has any idea about it, plz help me.

Regd's
Sanjay

Replies are listed 'Best First'.
Re: How to use the modules of pjlib in my perl program?
by roboticus (Chancellor) on Jan 22, 2009 at 14:57 UTC
    sanjay nayak:

    Exactly what is it that you don't understand?

    Did you read the docs for Inline::C? Did you review the examples?

    Are you having trouble with data passing? Linking? Data types? Turning on your computer?

    Did you read the Inline C cookbook?

    Did you use Super Search to find helpful nodes, like Getting Started with Inline::C?

    Do a little research on your own. (You might have, but from your question I really couldn't tell.) Then, give something a try. If you have an error, then ask a more specific question. Your question is vague enough that it's too much work to try to answer it. Make it easy on us!

    ...roboticus

    PerlMonks helps those who help themselves. Google, SuperSearch, complete error messages, ask complete questions!
Re: How to use the modules of pjlib in my perl program?
by Anonymous Monk on Jan 22, 2009 at 12:49 UTC
    Plz suggest how can i use the libraries and
    Try harder.
Re: Inline::C linking problems
by juster (Friar) on Jan 23, 2009 at 20:08 UTC

    The problems you are having compiling are more C specific than perl. Using a cpan module (like Net::SIP if using SIP is your goal here) would probably be an easier alternative than C if you aren't familiar with C.

    #include <E:\pjproject-1.0.1\pjlib\include\pj\config.h> is wrong, use quotation marks instead of brackets. You need to specify libraries Inline::C should link to and you might as well specify a path to include header files from.

    use Inline ( C => 'DATA', INC => '-IE:\pjproject-1.0.1\pjlib\include', LIBS => '-LE:\pjproject-1.0.1\pjlib\lib -lpj' ); # ^ path to compiled libraries ^ name of a library to l +ink with # !!! Fill in real values for LIB, not my guesses !!! ... __DATA__ __C__ #include <stdio.h> #include "pj/config.h" ...

    See 'Configuration Options' in Inline and Inline::C for more info.