Hi, On 2015-08-14 18:38:36 +0200, jacques klein wrote: > However I coudn't find any doc. about how to solve the problem of linking > C++ code and libs into the .so of my extension, > and nothing to solve the runtime-loading problem of the c++ specific .so > files ( for ex. to make work a simple usage std::string )
libstdc++ (or whatever your platform uses) should be automatically loaded, I don't think you'll need to worry about that. > I started my tests by cloning the contrib/worker_spi code, and when > transforming the code into C++, I could only note that C++ is not supported > in the provided Makefiles. Yes, that doesn't surprise me. Postgres itself doesn't need to care about looking for a usable C++ compiler et al. How exactly do you need to use the C++ code? The easiest probably would be to have a separate object file, built using your own makefile rule, that contains a the C++ and provides a C interface, and then use that from a background worker purely written in C. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers