<?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>Classic/Legacy CodeWarriorのトピックRe: Link error: symbol has different size</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162547#M2803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess the difference in between the versions of the assignment operator are caused by something else,&lt;/P&gt;&lt;P&gt;for example by inlining a function in one version and by not inlining it in another instance.&lt;/P&gt;&lt;P&gt;Could also be that both versions are ok, just different.&lt;/P&gt;&lt;P&gt;I don't think the warning is showing a real issue, you can either disable the warning or provide a custom version of the assignment operator.&lt;/P&gt;&lt;P&gt;If the class should be assignable provide a custom implementation of it in a cpp file, if the class should not be assignable just declare the assignment operator as private member without defining it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2009 23:40:53 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2009-12-23T23:40:53Z</dc:date>
    <item>
      <title>Link error: symbol has different size</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162543#M2799</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;&lt;SPAN style="color: #000000;"&gt;I have a&amp;nbsp;warning during linking&amp;nbsp;I don't understand: "L1827: Symbol __as__appFRC3app has different size in app.cpp.o (102 bytes) and main.cpp.o (103 bytes)"...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;The program seems to work correctly, but this warning&amp;nbsp;stays incomprehensible to me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Here is app.h:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;
#ifndef APP_H#define APP_H#include "btn.h"#include "pot.h"#include "brt.h"//#include "led.h"&amp;nbsp;&amp;nbsp; class app{&amp;nbsp;&amp;nbsp;&amp;nbsp; private:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; btn bouton1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; btn bouton2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pot poti1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pot poti2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inp* inputs[ 4 ];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; brt bruiteur;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int frequence;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int volume;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int on;&amp;nbsp;&amp;nbsp;&amp;nbsp; public:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void Init();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void ScanInputs();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void RefreshOutputs();&amp;nbsp; };#endif&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;and main.cpp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;PRE&gt;
#include &amp;lt;hidef.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* common defines and macros */#include &amp;lt;mc9s12dp256.h&amp;gt; /* derivative information&amp;nbsp;&amp;nbsp;&amp;nbsp; */#include "OS.h"#include "OS_Task.h"#include "app.h"#include "stack.h"#pragma LINK_INFO DERIVATIVE "mc9s12dp256b"#define COP_RESET() ARMCOP = 0x00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app Application;extern "C" void taskScan( void ){&amp;nbsp;&amp;nbsp;&amp;nbsp; Application.ScanInputs();}extern "C" void taskRefresh( void ){&amp;nbsp;&amp;nbsp;&amp;nbsp; Application.RefreshOutputs();}extern "C" void taskFeedCop( void ){&amp;nbsp;&amp;nbsp;&amp;nbsp; _FEED_COP();}extern "C" void taskCheckStack( void ){&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( !STACK_chk() )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COP_RESET();&amp;nbsp;&amp;nbsp; }void main( void ){&amp;nbsp;&amp;nbsp;&amp;nbsp; OS_Init();&amp;nbsp;&amp;nbsp;&amp;nbsp; Application.Init();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OS_Run();}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've noticed that when I remove the&amp;nbsp;comment for "led.h" inclusion (which is not needed here)&amp;nbsp;in app.h file, the warning disappears !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me please ?&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Psych0o0 on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-12-19&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:44 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:08:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162543#M2799</guid>
      <dc:creator>Psych0o0</dc:creator>
      <dc:date>2020-10-29T09:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Link error: symbol has different size</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162544#M2800</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;I would guess there is a difference between the declaration and the definition of the specified symbol.&lt;/P&gt;&lt;P&gt;Woudl be interesting to know what exactly you are doing in led.h.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also do you have a #pragma align in 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>Mon, 21 Dec 2009 21:07:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162544#M2800</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2009-12-21T21:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Link error: symbol has different size</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162545#M2801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is led.h:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
#ifndef LED_H#define LED_H#ifdef __cplusplusextern "C"{#endifvoid led_open (void);void led_close (void);void led_write(int first, int last);#ifdef __cplusplus}#endif#endif&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have a #pragma align anywhere...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:08:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162545#M2801</guid>
      <dc:creator>Psych0o0</dc:creator>
      <dc:date>2020-10-29T09:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Link error: symbol has different size</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162546#M2802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd suggest you create preprocessor output from both app.cpp and main.cpp, and check the declarations of 'app' in both cases. Chances are, some preprocessor replacements have come to haunt you. I could imagine the member 'on' (or possibly one of the types btn/pot), so common and small, being used for some preprocessor macro in one of the header files included in only one of the compilation units, that its meaning gets thwarted. The latter is just a pure guess from my side, it will probably be something completely different, but I've experienced such anomalies several times over the last 30 years...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 14:09:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162546#M2802</guid>
      <dc:creator>jbezem</dc:creator>
      <dc:date>2009-12-23T14:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Link error: symbol has different size</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162547#M2803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess the difference in between the versions of the assignment operator are caused by something else,&lt;/P&gt;&lt;P&gt;for example by inlining a function in one version and by not inlining it in another instance.&lt;/P&gt;&lt;P&gt;Could also be that both versions are ok, just different.&lt;/P&gt;&lt;P&gt;I don't think the warning is showing a real issue, you can either disable the warning or provide a custom version of the assignment operator.&lt;/P&gt;&lt;P&gt;If the class should be assignable provide a custom implementation of it in a cpp file, if the class should not be assignable just declare the assignment operator as private member without defining it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 23:40:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Link-error-symbol-has-different-size/m-p/162547#M2803</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-12-23T23:40:53Z</dc:date>
    </item>
  </channel>
</rss>

