Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to use the Perl Tk module to display data from an existing program. I've been able to call a Perl function from C and pass scalar and string data correctly, but I'm having problems with passing arrays by reference and with linking in the Tk and Class::Struct modules.
I can send the array address as an int and read the correct number within Perl, but all of my efforts to dereference it show an empty array.
Compiling the program with the Tk and Class::Struct invocations works, but it core dumps when I try to run it.
Does anyone have an example of how to do this? Given a set of code that works (passing an array by reference to a module), I'm sure I can figure out the details of my particular problem.
Thanks very much,
Diane.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interfacing a C program with Perl functions and modules
by Ovid (Cardinal) on Feb 18, 2004 at 19:37 UTC | |
|
Re: Interfacing a C program with Perl functions and modules
by flyingmoose (Priest) on Feb 18, 2004 at 19:42 UTC | |
by Anonymous Monk on Feb 18, 2004 at 22:52 UTC | |
by educated_foo (Vicar) on Feb 19, 2004 at 03:45 UTC | |
by Anonymous Monk on Feb 19, 2004 at 18:48 UTC |