<?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 Link Error: L1822: Symbol MCU_init__Fv in file main.cpp.o is undefined in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159241#M2575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm getting this message when I try to compile a project, but I'm using Device Initialization, so I don't know why it can't find a symbol it's supposed to be defined automatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I already worked in a different project with the same version of CodeWarrior and did the same procedure to create the project, and never got that error. The only difference is that I used the MC9S08GT60A, wich I got to flash program it fine and with no problems. Now, I'm trying to flash program the MC9S08GT16 and, as I said before, it brings up this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know why is this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2007 04:41:19 GMT</pubDate>
    <dc:creator>JOTAEME</dc:creator>
    <dc:date>2007-10-30T04:41:19Z</dc:date>
    <item>
      <title>Link Error: L1822: Symbol MCU_init__Fv in file main.cpp.o is undefined</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159241#M2575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm getting this message when I try to compile a project, but I'm using Device Initialization, so I don't know why it can't find a symbol it's supposed to be defined automatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I already worked in a different project with the same version of CodeWarrior and did the same procedure to create the project, and never got that error. The only difference is that I used the MC9S08GT60A, wich I got to flash program it fine and with no problems. Now, I'm trying to flash program the MC9S08GT16 and, as I said before, it brings up this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know why is this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 04:41:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159241#M2575</guid>
      <dc:creator>JOTAEME</dc:creator>
      <dc:date>2007-10-30T04:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Link Error: L1822: Symbol MCU_init__Fv in file main.cpp.o is undefined</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159242#M2576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is due to the C++ name mangling.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Device Initialization is generating ANSI C source code and you are trying to call an ANSI C function from a C++ module.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You have to let the compiler know that the function MCU_init is an ANSI C function.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just enclose the MCU_init function prototype between&lt;/DIV&gt;&lt;DIV&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;and&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#ifdef __cplusplus&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;#endif&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Example&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;/DIV&gt;&lt;DIV&gt;void MCU_init(void);&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;#ifdef __cplusplus&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;#endif&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope this helps.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:30:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159242#M2576</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-10-30T15:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Link Error: L1822: Symbol MCU_init__Fv in file main.cpp.o is undefined</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159243#M2577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After I used the solution, I got a "C1073: Linkage specification contradicts earlier specification" instead. And I&amp;nbsp;defined it only once.&lt;/P&gt;&lt;P&gt;#ifndef _HARDWARE_H_&lt;BR /&gt;#define&amp;nbsp; _HARDWARE_H_&lt;/P&gt;&lt;DIV&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;/DIV&gt;&lt;P&gt;void PLL_init();&lt;/P&gt;&lt;DIV&gt;#ifdef __cplusplus&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;#endif&lt;/DIV&gt;&lt;DIV&gt;#endif&lt;/DIV&gt;&lt;P&gt;What&amp;nbsp;shall I do now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 19:08:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159243#M2577</guid>
      <dc:creator>yida</dc:creator>
      <dc:date>2011-04-21T19:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Link Error: L1822: Symbol MCU_init__Fv in file main.cpp.o is undefined</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159244#M2578</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;First this seems to be a completely different topic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please post a new message for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you forcing compilation of whole application in C++?&lt;/P&gt;&lt;P&gt;Did you look at the preprocessing listing for the source file generating the message?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have other definition/declaration for PLL_Init there?&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, 26 Apr 2011 18:52:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-Error-L1822-Symbol-MCU-init-Fv-in-file-main-cpp-o-is/m-p/159244#M2578</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2011-04-26T18:52:21Z</dc:date>
    </item>
  </channel>
</rss>

