<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Include Files Problem</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/15089/include-files-problem</link><description> Hi Friends, 
I&amp;#39;m currently working on C51v6.02 by Keil, My Problem goes like this: 
 
I have a project which has the files file1.c , file2.c , file3.c . And header files header1.h , header2.h , header3.h . The source code of file1.c goes like this. </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Include Files Problem</title><link>https://community.arm.com/thread/121786?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2002 05:26:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0305864e-7014-4d89-a2a9-3d167ad18cf2</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;I&amp;#39;m sure you can; but my point is that you shouldn&amp;#39;t have to!&lt;br /&gt;
The Linker knows the information, so why doesn&amp;#39;t it include it in the message?!!&lt;br /&gt;
&lt;i&gt;eg&lt;/i&gt;&lt;br /&gt;
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS&lt;br /&gt;
    SYMBOL:  VARIABLE_NAME&lt;br /&gt;
    MODULE:  File_Name1.obj  (FILE_NAME)&lt;br /&gt;
    MODULE:  File_Name2.obj  (FILE_NAME)&lt;br /&gt;
&lt;br /&gt;
As I&amp;#39;ve said before, Borland does it like this.&lt;br /&gt;
&lt;br /&gt;
What is the point of saying that it&amp;#39;s detected &lt;b&gt;multiple&lt;/b&gt; definitions, but then only listing &lt;b&gt;one&lt;/b&gt; of them!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Include Files Problem</title><link>https://community.arm.com/thread/110060?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2002 04:57:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fba53a72-ce50-4ec7-b17a-a03a62a726ed</guid><dc:creator>Keil  Support Intl.</dc:creator><description>&lt;p&gt;You can use the Linker IXREF directive to figure out which module the symbol already defines.  This option is enabled under uVision2 - Project - Options for Target - Listing - Linker - Cross Reference.&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Include Files Problem</title><link>https://community.arm.com/thread/95106?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2002 13:17:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:afb1a70e-d92a-4312-90d0-49a28957a226</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt; Borland C++ Builder would list all the files which defined the offending symbol, thus making your search much easier! &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Oh well, you would do a global search in CodeWright anyhow to find the actual places.&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Include Files Problem</title><link>https://community.arm.com/thread/54516?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2002 09:47:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3fd2155c-3508-47d9-a2de-8ffeffba9a22</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;The message tells you the name of the symbol with the multiple definitions; use that to search all your files &amp;amp; spot the repeats!&lt;br /&gt;
&lt;br /&gt;
The duplicates may not necessarily be in the headers&lt;br /&gt;
&lt;br /&gt;
I think I&amp;#39;ve criticised this message before: it&amp;#39;s fairly pointless of it to complain about &lt;b&gt;multiple&lt;/b&gt; definitions, but then only list &lt;b&gt;one&lt;/b&gt; module name!&lt;br /&gt;
&lt;br /&gt;
Borland C++ Builder would list &lt;i&gt;&lt;b&gt;all&lt;/b&gt;&lt;/i&gt; the files which defined the offending symbol, thus making your search much easier!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Include Files Problem</title><link>https://community.arm.com/thread/38933?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2002 09:29:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:52c65f91-e1f0-474a-ac5c-729ac6981476</guid><dc:creator>Dan Henry</dc:creator><description>&lt;p&gt;Make sure you only have external declarations in your header files and not any defining declarations (i.e., space-allocating).  Defining declarations only belong in &amp;quot;.c&amp;quot; files.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Include Files Problem</title><link>https://community.arm.com/thread/38930?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2002 08:53:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f86911b9-2f5a-432b-ae2a-8bf27f28a812</guid><dc:creator>Walt Conley</dc:creator><description>&lt;p&gt;Yaswanth:&lt;br /&gt;
&lt;br /&gt;
I do not see anything wrong with what you are doing. I use the same scheme as you with all my projects.&lt;br /&gt;
&lt;br /&gt;
Is it possible that you are using variable names longer than 32 characters? They can be 256 character long but only the first 32 characters are significant (at least for C166). Just a wild guess.&lt;br /&gt;
&lt;br /&gt;
-Walt&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Include Files Problem</title><link>https://community.arm.com/thread/38934?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2002 08:15:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:246add26-551a-4531-b0d3-753e9538eee2</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;you probably have some name (see error message) included in all header files.  This often happens when the .h includes another .h&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>