<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Illegal Storage Class error with externs in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171660#M5331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should be able to declare external storage for variables in a .h file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may have an issue some other place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did&amp;nbsp;you try to generate the pre-processor output for one of your source file?&lt;/P&gt;&lt;P&gt;Looking at listing file after pre-processing might explain what is going on here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a #define extern somewhere in the application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this does not help, I need to get a look at the preprocessor listing file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2009 16:57:06 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2009-04-14T16:57:06Z</dc:date>
    <item>
      <title>Illegal Storage Class error with externs</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171659#M5330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on an HCS08 project, using CW 6.2, in C with a few source files and 1 header file containing all the common information, including declarations of some global variables.&amp;nbsp; They're all defined in the header as extern, and declared in the various source files wherever it makes the most sense for them to live.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever I go to compile any of the source files in the project, the compiler gets to the global declarations and spits out "Error: C1005: Illegal storage class".&amp;nbsp; CW help has a fairly useless description of what this means, but from the example and tip given I can guess that the compiler doesn't like my use of extern here, although I can't figure out why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried moving the globals around in the .h file and the problem follows them, so it's not an issue with a surrounding line of code.&amp;nbsp; I went through the preprocessed files looking for a duplicate name on the declared variables and found nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody suggest other things I might look for, or clarify under what conditions an extern might result in a C1005 error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 05:04:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171659#M5330</guid>
      <dc:creator>bhamilton</dc:creator>
      <dc:date>2009-04-14T05:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal Storage Class error with externs</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171660#M5331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should be able to declare external storage for variables in a .h file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may have an issue some other place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did&amp;nbsp;you try to generate the pre-processor output for one of your source file?&lt;/P&gt;&lt;P&gt;Looking at listing file after pre-processing might explain what is going on here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a #define extern somewhere in the application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this does not help, I need to get a look at the preprocessor listing file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 16:57:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171660#M5331</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2009-04-14T16:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal Storage Class error with externs</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171661#M5332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear bhamilton,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide an example of your definition from the header file and the corresponding declaration in the C file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bit hard to suggest reasons otherwise &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can get similar errors if the memory model changes betweem the declaration and definition (from memory).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also - is the error occurcing when the header file or the C file is being compiled?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by pgo on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-04-14&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;08:12 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 17:12:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171661#M5332</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2009-04-14T17:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal Storage Class error with externs</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171662#M5333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be caused by the missing semicolon at the end of prototypes or data declarations in the header file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stanish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 17:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171662#M5333</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2009-04-14T17:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal Storage Class error with externs</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171663#M5334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gads.&amp;nbsp; Stanish was right, it was a missing semicolon nowhere near the externs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C compiler error messages confound me yet again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by bhamilton on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-04-14&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:36 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 20:36:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171663#M5334</guid>
      <dc:creator>bhamilton</dc:creator>
      <dc:date>2009-04-14T20:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal Storage Class error with externs</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171664#M5335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, same here.&amp;nbsp; I wasted a good 1 hour on this before giving up and consulting the forums.&amp;nbsp; Should have &lt;EM&gt;started&lt;/EM&gt; with the forums!&amp;nbsp; I would never have guessed a missing semicolon, based ont he error code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 04:11:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Illegal-Storage-Class-error-with-externs/m-p/171664#M5335</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2010-07-09T04:11:29Z</dc:date>
    </item>
  </channel>
</rss>

