Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: reading C data structure

by GrandFather (Cardinal)
on Sep 18, 2012 at 02:22 UTC ( #994171=note: print w/ replies, xml ) Need Help??


in reply to Re^2: reading C data structure
in thread reading C data structure

That really doesn't get us much further ahead. Do you want write code to call Perl from C (possible), or write code to call C from Perl (also possible), or call an existing C library function from Perl (possible too), or execute an existing Perl script from a C application passing a value through (possible) or execute an existing C application from a Perl script returning a value to the script (also possible), or something else?

Maybe you should let us in on the secret of what you actually want to do?

True laziness is hard work


Comment on Re^3: reading C data structure
Re^4: reading C data structure
by asura (Initiate) on Sep 18, 2012 at 14:13 UTC

    i am writing a code to call C from Perl. As I said I have one variable in a C code that I want to export. This variable needs to be used by a perl function.

      So in fact it seems you have some C code that you need to access from Perl. The key "word" you need is "XS" and the documentation is in perlxs. You will probably find that documentation heavy going. If you describe what you are doing better you may garner more help. Calling some C code from Perl and returning a result is a very common task.

      True laziness is hard work

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994171]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-12-29 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls