ginttu has asked for the wisdom of the Perl Monks concerning the following question:
The code above is a C program that uses a library, libgin.a. The library has three other one-line print statement programs tied to it. Here's my code for the Inline process:#include <stdio.h> /* define external functions */ extern void football(); extern void ok(); extern void big12(); int main() { printf("Inside main()\n"); /* use a function from each object file that is in the library */ football(); ok(); big12(); return 0; }
What I have done is instead of calling main.c from my Inline code, I just rewrote the C code to call the functions in the library. I keep getting this error:#!/usr/local/perl/5.6.1.4/bin/perl -w use ConsistentSet "1.0.2"; # This finds the library Inline use Inline C => DATA => LIBS => '-lgin'; first(); __END__ __C__ #include <stdio.h> #include "main.c" int first() { printf("Inside main()\n"); /* use a function from each object file that is in the library */ football(); ok(); big12(); return 0; }
Inside main() ld.so.1: /usr/local/perl/5.6.1.4/bin/perl: fatal: relocation error: fi +le /SIMPLE/_Inline/lib/auto/first_pl_d0aa/first_pl_d0aa.so: symbol fo +otball: referenced symbol not found Killed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Still More Inline Problems
by Madams (Pilgrim) on Nov 21, 2002 at 22:24 UTC | |
|
Re: Still More Inline Problems
by RMGir (Prior) on Nov 21, 2002 at 18:53 UTC | |
by ginttu (Sexton) on Nov 21, 2002 at 19:19 UTC |