首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 ><command-line>:0:8: error:一个声明中有多个类型

<command-line>:0:8: error:一个声明中有多个类型
EN

Stack Overflow用户
提问于 2018-08-01 16:52:22
回答 1查看 93关注 0票数 0

当我试图在CentOS 7.5中执行语法服务器代码(包含c和c++文件)时,遇到以下错误

获取的错误:

代码语言:javascript
复制
[command-line]:0:8: error: multiple types in one declaration
[command-line]:0:8: error: declaration does not declare anything `enter code here`[-fpermissive]
[command-line]:0:7: error: multiple types in one declaration
[command-line]:0:7: error: declaration does not declare anything [-fpermissive]
In file included from /usr/include/_G_config.h:15:0,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:74,
                 from jsapi.h:47,
                 from jsatom.h:47,
                 from jscntxt.h:59,
                 from jsanalyze.h:45,
                 from jsanalyze.cpp:40:
jsfun.h: In static member function ‘static uintN JSFunction::offsetOfNativeOrScript()’:
jsfun.h:230:37: warning: invalid access to non-static data member ‘JSFunction::u’  of NULL object [-Winvalid-offsetof]
         return offsetof(JSFunction, u.nativeOrScript);
                                     ^
jsfun.h:230:37: warning: (perhaps the ‘offsetof’ macro was used incorrectly) [-Winvalid-offsetof]
In file included from /usr/include/time.h:37:0,
                 from prmjtime.h:46,
                 from jscntxt.h:75,
                 from jsanalyze.h:45,
                 from jsanalyze.cpp:40:
jscntxt.h: In function ‘JSContext* js_ContextFromLinkField(JSCList*)’:
jscntxt.h:2963:64: warning: invalid access to non-static data member ‘JSContext::link’  of NULL object [-Winvalid-offsetof]
     return (JSContext *) ((uint8 *) link - offsetof(JSContext, link));
                                                                ^
jscntxt.h:2963:64: warning: (perhaps the ‘offsetof’ macro was used incorrectly) [-Winvalid-offsetof]
make[1]: *** [jsanalyze.o] Error 1

我不能弄清楚这个问题。关于这一点,有人能帮我吗?谢谢

EN

回答 1

Stack Overflow用户

发布于 2018-08-06 14:20:19

一旦通过安装spiderMonkey完成autoconf-2.13,上述错误就得到了解决。有关安装的更多信息,请访问以下站点:https://wiki.apache.org/couchdb/Installing_SpiderMonkey

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51629104

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档