<?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: CodeWarrior 10 Macro Redefined Compile Error in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-10-Macro-Redefined-Compile-Error/m-p/190165#M6816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The prefix file you are using to build your application is specified in Project Properties&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;C/C++ Build&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;ColdFire Compiler&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Input&lt;/STRONG&gt;&lt;/EM&gt; page, in field &lt;STRONG&gt;Prefix File&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional macros can be defined on the command line in Project Properties&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;C/C++ Build&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;ColdFire Compiler&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Language Settings&lt;/STRONG&gt;&lt;/EM&gt; page, in field &lt;STRONG&gt;Other flags&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro redefinition warning might also be generated because the file 410-2011rOBDMain.h is included several times.&lt;/P&gt;&lt;P&gt;Can you try to add following line to your prefix file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #pragma once on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should prevents header files from being processed more than once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2012 07:11:20 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2012-11-28T07:11:20Z</dc:date>
    <item>
      <title>CodeWarrior 10 Macro Redefined Compile Error</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-10-Macro-Redefined-Compile-Error/m-p/190164#M6815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm migrating a CodeWarrior classic project to CodeWarrior 10, and I'm having a little trouble getting the ported project to compile.&amp;nbsp; I did use the CodeWarrior Classic Project Importer, and the import wizard seemed to successfully complete.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating a new header file for the symbols that were defined in the CW Classic Preprocessor project settings, I set that file as the ColdFire Compiler Input Prefix File in the CW10 project settings.&amp;nbsp; Compiling the project yielded the following macro redefinition error:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;=#define _MSL_OS_TIME_SUPPORT 1 &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;macro '_MSL_OS_TIME_SUPPORT' redefined&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;"C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwccmcf" @@"Sources/main.args" -o "Sources/main_c.obj" "C:/[PROJECT DIR]/Sources/main.c" -MD -gccdep&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwccmcf|Compiler|Error&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwccmcf|Compiler|Error&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;(C:\[PROJECT DIR]\Preincludes\410-2011rOBDMain.h|9|8|20|334|20)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwccmcf|Compiler|Error&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;(C:\[PROJECT DIR]\Preincludes\410-2011rOBDMain.h|9|8|20|334|20)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwccmcf|Compiler|Error&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;=#define _MSL_OS_TIME_SUPPORT 1 &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;(C:\[PROJECT DIR]\Preincludes\410-2011rOBDMain.h|9|8|20|334|20)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;=#define _MSL_OS_TIME_SUPPORT 1 &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;=#define _MSL_OS_TIME_SUPPORT 1 &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;(included from:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;(C:\[PROJECT DIR]\Preincludes\410-2011rOBDMain.h|9|8|20|334|20)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command-line defines):1&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;C:/Program Files/Freescale/CW MCU v10.2/MCU/ColdFire_Tools/Command_Line_Tools/mwccmcf|Compiler|Error&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;macro '_MSL_OS_TIME_SUPPORT' redefined&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;(included from:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;macro '_MSL_OS_TIME_SUPPORT' redefined&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;macro '_MSL_OS_TIME_SUPPORT' redefined&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;macro '_MSL_OS_TIME_SUPPORT' redefined&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command-line defines):1&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (C-C++ Preprocessor Panel):1&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What gets me is the references to the command-line definitions.&amp;nbsp; _MSL_OS_TIME_SUPPORT is defined in the new header file previously mentioned.&amp;nbsp; I don't see anywhere in the CW10 project settings where this macro would be getting defined.&amp;nbsp; Any help would be appreciated.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 23:07:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-10-Macro-Redefined-Compile-Error/m-p/190164#M6815</guid>
      <dc:creator>jimfell</dc:creator>
      <dc:date>2012-11-27T23:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: CodeWarrior 10 Macro Redefined Compile Error</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-10-Macro-Redefined-Compile-Error/m-p/190165#M6816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The prefix file you are using to build your application is specified in Project Properties&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;C/C++ Build&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;ColdFire Compiler&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Input&lt;/STRONG&gt;&lt;/EM&gt; page, in field &lt;STRONG&gt;Prefix File&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional macros can be defined on the command line in Project Properties&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;C/C++ Build&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;ColdFire Compiler&lt;/STRONG&gt;&lt;/EM&gt; &amp;gt; &lt;EM&gt;&lt;STRONG&gt;Language Settings&lt;/STRONG&gt;&lt;/EM&gt; page, in field &lt;STRONG&gt;Other flags&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro redefinition warning might also be generated because the file 410-2011rOBDMain.h is included several times.&lt;/P&gt;&lt;P&gt;Can you try to add following line to your prefix file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #pragma once on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should prevents header files from being processed more than once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 07:11:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-10-Macro-Redefined-Compile-Error/m-p/190165#M6816</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2012-11-28T07:11:20Z</dc:date>
    </item>
  </channel>
</rss>

