Skip to content

Instantly share code, notes, and snippets.

Created October 10, 2013 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6914604 to your computer and use it in GitHub Desktop.
Save anonymous/6914604 to your computer and use it in GitHub Desktop.
B::CC / cc_harness problem
$ cat Foo.pm
package Foo;
sub foo { 123 }
foo();
1;
$ perl -MO=CC,-mFoo,-uFoo.pm,-oFoo.c Foo.pm
Foo.pm syntax OK
$ cc_harness -shared -c -o Foo.so Foo.c
...
Foo.c:404:15: error: too few arguments to function call, single argument 'my_perl' was not specified
perl_init();
~~~~~~~~~ ^
Foo.c:260:1: note: 'perl_init' declared here
static int perl_init(pTHX)
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment