in reply to Using the perl API in C

so perhaps there is something I have to feed the linker here?

Yes. You are using Perl, so you'll need to link in Perl.

It's up to you whether you rely on Perl or not. Take for example XML::LibXML. The real work is done by pure C or C++ code that knows nothing of Perl. The only C code that knows of Perl is glue code, the interface.

If you follow that model*, you can test the underlying guts without using Perl. I think this is what you desire.

* — XML::LibXML's guts is a separate install, but you don't have to go that far if you don't want to.