簡體   English   中英

<command-line> :0:8:錯誤:一個聲明中包含多種類型

[英]<command-line>:0:8: error: multiple types in one declaration

當我嘗試在CentOS 7.5中執行語法服務器代碼(包含c和c ++文件)時,遇到以下錯誤

獲得錯誤:

[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

我無法解決問題。 有人可以幫我嗎? 謝謝

通過安裝spiderMonkey完成autoconf-2.13后,上述錯誤已解決。 有關安裝的更多信息,請訪問以下站點: https : //wiki.apache.org/couchdb/Installing_SpiderMonkey

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM