{"id":967,"date":"2019-06-05T17:37:13","date_gmt":"2019-06-05T17:37:13","guid":{"rendered":"https:\/\/ibex.tech\/embedded\/?p=967"},"modified":"2022-02-18T15:37:48","modified_gmt":"2022-02-18T15:37:48","slug":"newer-xc8-version-issues","status":"publish","type":"post","link":"https:\/\/ibex.tech\/embedded\/microchip\/pic18\/xc8-compiler\/issues-xc8-compiler\/newer-xc8-version-issues","title":{"rendered":"Newer XC8 version issues"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">fatal error: &#8216;p18f23k22.h&#8217; file not found<\/h5>\n\n\n\n<p>You no longer include the device specific header file like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;p18f23k22.h><\/code><\/pre>\n\n\n\n<p>Instead you include this file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;xc.h><\/code><\/pre>\n\n\n\n<p>This header file is typically included into each C source file you write. It is a generic header file that will include other device- and architecture-specific header files when you build your project.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">#asm &#8211; error: invalid preprocessing directive<\/h5>\n\n\n\n<p>Project properties &gt; XC8 Global Options: change &#8220;C Standard&#8221; from &#8220;C 99&#8221; to &#8220;C 90&#8221;. <\/p>\n\n\n\n<p>Also do for  XC8 Global Options &gt; XC8 Linker &gt; Link in C library<\/p>\n\n\n\n<p>It will now accept &#8220;#asm&#8221;.  This is the official reason:  &#8220;In-line assembly The #asm \u2026 #endasm form of inline assembly is no longer accepted when building for C99. The asm() form of inline assembly is now the only way to embed assembly instructions inline with C code.&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>fatal error: &#8216;p18f23k22.h&#8217; file not found You no longer include the device specific header file like this: Instead you include this file: This header file is typically included into each C source file you write. It is a generic header file that will include other device- and architecture-specific header files when you build your project. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-967","post","type-post","status-publish","format-standard","hentry","category-issues-xc8-compiler"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/comments?post=967"}],"version-history":[{"count":7,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/967\/revisions"}],"predecessor-version":[{"id":1129,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/967\/revisions\/1129"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/media?parent=967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/categories?post=967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/tags?post=967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}