I'm trying to build a custom background worker for 9.3 in C++. I'm having trouble getting it running, mostly due to what I think is some weird name mangling. The code is pretty simple and works fine if I compile it as a C background worker, but the plan is to link this worker to some other C++ libraries.
I guess I should first ask if this is even possible to do, at a glance it seems like it but I've been at it for a while and it's not working out. Here is the output for compilation of a simple CPP project: https://gist.github.com/qpfiffer/30bbd154277796b68245 Recompiling for -fPIC (as it says to) correctly builds the shared library, but then when I try to run Postgres with my .so file being loaded I get this: https://gist.github.com/qpfiffer/e59c9260b687a23e2743 The cpp, header and make files are all here if that would prove useful: https://gist.github.com/qpfiffer/5bb503264b903a29a191 Any input would be greatly appreciated. QP