NPAPI XCode 链接器
我正在尝试编译 firefox 的基本插件,链接器报告以下问题:
架构 i386 的未定义符号: “_NPN_GetValue”,引用自: _Plugin登录main.o “_NPN_GetStringIdentifier”,引用自: _Plugin登录main.o “_NPN_GetProperty”,引用自: _Plugin登录main.o “_NPN_Invoke”,引用自: _Plugin登录main.o “_NPN_ReleaseObject”,引用自: _Plugin登录main.o “_NPN_ReleaseVariantValue”,引用自: _Plugin登录main.o ld:未找到架构 i386 的符号 collect2: ld 返回 1 退出状态
我是否错过了添加一些链接库?
I'm trying to compile basic plugin for firefox and linker reports following problem:
Undefined symbols for architecture i386:
"_NPN_GetValue", referenced from:
_PluginLog in main.o
"_NPN_GetStringIdentifier", referenced from:
_PluginLog in main.o
"_NPN_GetProperty", referenced from:
_PluginLog in main.o
"_NPN_Invoke", referenced from:
_PluginLog in main.o
"_NPN_ReleaseObject", referenced from:
_PluginLog in main.o
"_NPN_ReleaseVariantValue", referenced from:
_PluginLog in main.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
have I missed to add some linked libraries?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能像普通函数一样调用这些函数(它们不是由浏览器导出的,也不是针对浏览器链接的);您需要使用浏览器传递给您的 NPNetscapeFuncs 结构中的函数指针。
You can't just call those functions like you would a normal function (they aren't exported by a browser, nor are you linking against a browser); you need to use the function pointers from the
NPNetscapeFuncs
struct passed to you by the browser.