I am trying to get WebKit2GTK+ Extensions to work, it is a simple extension that will just print into the console when a page is created. Here is my project structure:
Since it's C++ it could be due to name mangling. Try to prefix the webkit_web_extension_initialize function with extern "C". For example:
extern "C" G_MODULE_EXPORT void
webkit_web_extension_initialize (WebKitWebExtension *extension)
{
std::cout << "extension hi\n";
/* your code */
}
You can use readelf or objdump to list all exported symbols and see if they have mangled names.