#ifdef XP_UNIX /* * Set up the plugin function table that Netscape will use to * call us. Netscape needs to know about our version and size * and have a UniversalProcPointer for every function we * implement. */ pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; pluginFuncs->size = sizeof(NPPluginFuncs); pluginFuncs->newp = NewNPP_NewProc(NPP_New); pluginFuncs->destroy = NewNPP_DestroyProc(NPP_Destroy); pluginFuncs->setwindow = NewNPP_SetWindowProc(NPP_SetWindow); pluginFuncs->newstream = NewNPP_NewStreamProc(NPP_NewStream); pluginFuncs->destroystream = NewNPP_DestroyStreamProc(NPP_DestroyStream); pluginFuncs->asfile = NewNPP_StreamAsFileProc(NPP_StreamAsFile); pluginFuncs->writeready = NewNPP_WriteReadyProc(NPP_WriteReady); pluginFuncs->write = NewNPP_WriteProc(NPP_Write); pluginFuncs->print = NewNPP_PrintProc(NPP_Print); pluginFuncs->urlnotify = NewNPP_URLNotifyProc(NPP_URLNotify); pluginFuncs->event = NULL; pluginFuncs->getvalue = NewNPP_GetValueProc(NPP_GetValue); #ifdef OJI pluginFuncs->javaClass = NPP_GetJavaClass(); #endif np_entry.cpp 里面的段垃圾 搜索整个源代码都找不到NewNPP_NewProc,NewNPP_DestroyProc等等 pluginFuncs->newp = NewNPP_NewProc(NPP_New); pluginFuncs->destroy = NewNPP_DestroyProc(NPP_Destroy); pluginFuncs->setwindow = NewNPP_SetWindowProc(NPP_SetWindow); pluginFuncs->newstream = NewNPP_NewStreamProc(NPP_NewStream); pluginFuncs->destroystream = NewNPP_DestroyStreamProc(NPP_DestroyStream); pluginFuncs->asfile = NewNPP_StreamAsFileProc(NPP_StreamAsFile); pluginFuncs->writeready = NewNPP_WriteReadyProc(NPP_WriteReady); pluginFuncs->write = NewNPP_WriteProc(NPP_Write); pluginFuncs->print = NewNPP_PrintProc(NPP_Print); pluginFuncs->urlnotify = NewNPP_URLNotifyProc(NPP_URLNotify); pluginFuncs->event = NULL; pluginFuncs->getvalue = NewNPP_GetValueProc(NPP_GetValue); 正确放置到/usr/lib/mozilla/plugins下面吧,吧编译好了的.so