{"id":232,"date":"2019-05-30T01:31:46","date_gmt":"2019-05-30T01:31:46","guid":{"rendered":"http:\/\/edcint.co.nz\/checkwmiplus\/?post_type=faq&#038;p=232"},"modified":"2019-05-30T01:31:46","modified_gmt":"2019-05-30T01:31:46","slug":"wmic-wont-compile-usr-include-stdc-predef-h0-syntax-error-near-3","status":"publish","type":"faq","link":"https:\/\/edcint.co.nz\/checkwmiplus\/faq\/wmic-wont-compile-usr-include-stdc-predef-h0-syntax-error-near-3\/","title":{"rendered":"wmic won&#8217;t compile: \/usr\/include\/stdc-predef.h:0: Syntax error near &#8216;3&#8217;"},"content":{"rendered":"<p>The output surrounding the error looks something like:<br \/>\nCompiling .\/librpc\/idl\/atsvc.idl<br \/>\n\/usr\/include\/stdc-predef.h:0: Syntax error near &#8216;3&#8217;<br \/>\nFailed to parse .\/librpc\/idl\/atsvc.idl at .\/pidl\/pidl line 583.<br \/>\nMakefile:28880: recipe for target &#8216;idl&#8217; failed<br \/>\nmake[1]: *** [idl] Error 1<\/p>\n<p>If you get this error, it is probably because you are using GCC v4.8 or higher.<\/p>\n<p>This can be resolved by using the following make command line:<br \/>\nmake &#8220;CPP=gcc -E -ffreestanding&#8221;<\/p>\n<p>For technical details refer to <a href=\"https:\/\/gcc.gnu.org\/gcc-4.8\/porting_to.html\">this article<\/a><\/p>\n<p>The relevant text from the article is included here:<br \/>\nPre-processor pre-includes<\/p>\n<p>The GCC pre-processor may now pre-include a file that defines certain macros for the entirety of the translation unit. This allows fully conformant implementations of C99\/C11 and other standards that require compiler or compiler + runtime macros that describe implementation availability.<\/p>\n<p>On GNU\/Linux, is pre-included.<\/p>\n<p>This subtle change means that some more creative uses of the pre-processor may now fail, with the following diagnostic:<\/p>\n<p>\/usr\/include\/stdc-predef.h:0: error: Syntax error near &#8216;3&#8217;<\/p>\n<p>As a workaround, the stdc-predef.h pre-include can be disabled with the use of -ffreestanding. For non C\/C++ code, use the pre-processor flag -P.<\/p>\n","protected":false},"author":1,"template":"","faq_groups":[2],"class_list":["post-232","faq","type-faq","status-publish","hentry","faq-group-errors"],"_links":{"self":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/faqs\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/faqs"}],"about":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"faq-group","embeddable":true,"href":"https:\/\/edcint.co.nz\/checkwmiplus\/wp-json\/wp\/v2\/faq_groups?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}