<?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>Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/43378/error-l6200e-symbol-multiply-defined-compiling-adam-dunkels-uip</link><description> 
Hello, 

 
I get this error when compiling Adam Dunkels uIP adapted to
LPC-2124 board. fs.c contains the functions to open files (fs_open)
and fsdata.c contains the html code of these files. I&amp;#39;m completely
stuck with this, I would apreciate any help</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/thread/133296?ContentTypeID=1</link><pubDate>Fri, 22 May 2009 08:14:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4e435cfb-b17f-47f6-8a63-8fee5c0b9f1c</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
I think it would actually be quite hard to make an effective
filter that didn&amp;#39;t make too many &amp;quot;false hits&amp;quot;...?&lt;/p&gt;

&lt;p&gt;
But I still say it&amp;#39;s symptomatic of an underlying problem: the
instructions &lt;i&gt;&lt;b&gt;are&lt;/b&gt;&lt;/i&gt; very clearly stated; anyone who&amp;#39;s
being slack enough to miss them - and to not even notice in the
preview - has probably also missed important details about their
project &lt;i&gt;for the very same reason&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
As I said earlier, &lt;i&gt;&lt;b&gt;Attention to detail is key in this
game!&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/thread/133225?ContentTypeID=1</link><pubDate>Fri, 22 May 2009 06:20:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c33c64ad-5476-42fd-bf64-7716c0116f26</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
there must be a way to implement some filter that would prevent
posting of a reply/thread is it contains unformatted code...! That
will save you so much heart ache, Andy ;-)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/thread/133126?ContentTypeID=1</link><pubDate>Fri, 22 May 2009 06:10:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:17631c51-cd82-42be-aa61-e4ebb7a59c34</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;I post them (headers files) just in case someone can help
me&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
The text &amp;quot;file_cgi_files&amp;quot; occurs nowhere in either of those files
- so the problem must, obviously, lie elsewhere...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/thread/133014?ContentTypeID=1</link><pubDate>Fri, 22 May 2009 03:50:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8de26b71-bd6f-4b36-b60e-9586bd8b9b79</guid><dc:creator>lopez garcia</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sorry for mistakes,&lt;/p&gt;

&lt;p&gt;
I am going to check header files carefulle and try to resolve
these problems, anyway I post them (headers files) just in case
someone can help me:&lt;/p&gt;

&lt;p&gt;
Thank you so much for your help.&lt;/p&gt;

&lt;p&gt;
fs.h:&lt;/p&gt;

&lt;pre&gt;
#ifndef __FS_H__
#define __FS_H__

#include &amp;quot;uip.h&amp;quot;

/**
 * An open file in the read-only file system.
 */
struct fs_file {
  char *data;  /**&amp;lt; The actual file data. */
  int len;     /**&amp;lt; The length of the file data. */
};

/**
 * Open a file in the read-only file system.
 *
 * \param name The name of the file.
 *
 * \param file The file pointer, which must be allocated by caller and
 * will be filled in by the function.
 */
int fs_open(const char *name, struct fs_file *file);

#ifdef FS_STATISTICS
#if FS_STATISTICS == 1
u16_t fs_count(char *name);
#endif /* FS_STATISTICS */
#endif /* FS_STATISTICS */

/**
 * Initialize the read-only file system.
 */
void fs_init(void);

#endif /* __FS_H__ */
&lt;/pre&gt;

&lt;p&gt;
fsdata.h&lt;/p&gt;

&lt;pre&gt;
#ifndef __FSDATA_H__
#define __FSDATA_H__

&lt;br /&gt;

#include &amp;quot;uipopt.h&amp;quot;

&lt;br /&gt;

struct fsdata_file {
  const struct fsdata_file *next;
  const char *name;
  const char *data;
  const int len;
#ifdef FS_STATISTICS
#if FS_STATISTICS == 1
  u16_t count;
#endif /* FS_STATISTICS */
#endif /* FS_STATISTICS */
};

&lt;br /&gt;

struct fsdata_file_noconst {
  struct fsdata_file *next;
  char *name;
  char *data;
  int len;
#ifdef FS_STATISTICS
#if FS_STATISTICS == 1
  u16_t count;
#endif /* FS_STATISTICS */
#endif /* FS_STATISTICS */
};

&lt;br /&gt;

#endif /* __FSDATA_H__ */
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/thread/132827?ContentTypeID=1</link><pubDate>Fri, 22 May 2009 03:41:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a8dbe9cc-8b92-41e1-a937-5490fdb2ecf3</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Please read &amp;amp; follow the instructions for posting source code
- and pay attention to the &amp;#39;&lt;b&gt;Preview&lt;/b&gt;&amp;#39;&lt;/p&gt;

&lt;p&gt;
Attention to detail is key in this game!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;I know that I only have to declare (sic) it in one of them and
make a reference as extern-declare in the other.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
To be precise, you need to &lt;i&gt;&lt;b&gt;define&lt;/b&gt;&lt;/i&gt; it exactly once -
and then use extern &lt;i&gt;&lt;b&gt;declarations&lt;/b&gt;&lt;/i&gt; as often as you like
elsewhere.&lt;/p&gt;

&lt;p&gt;
You haven&amp;#39;t shown your header&amp;#39;s contents - are you sure it doesn&amp;#39;t
contain a definition...?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/thread/132611?ContentTypeID=1</link><pubDate>Fri, 22 May 2009 03:32:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:52a20a27-245e-4ac4-90bc-ccc868074b03</guid><dc:creator>lopez garcia</dc:creator><description>&lt;p&gt;&lt;p&gt;
First of all thank for your reply,&lt;/p&gt;

&lt;p&gt;
I have been checked in both files (fs.c and fsdata.c) if I had
defined the same file_cgi_files in both, but as far i can see I
didn&amp;Acirc;&amp;#39;t. I know that I only have to declare it in one of them
and make a reference as extern-declare in the other. But I
can&amp;Acirc;&amp;#39;t see where is the mistake because I only define it in
fsdata.c&lt;/p&gt;

&lt;p&gt;
I send the code just in case you don&amp;Acirc;&amp;#39;t mind to have a look
at it, I&amp;Acirc;&amp;#39;ve been stuck with it for a week, any help
apreciated.&lt;/p&gt;

&lt;p&gt;
Here is the code of fs.c:&lt;br /&gt;
#include &amp;quot;uip.h&amp;quot;&lt;br /&gt;
#include &amp;quot;httpd.h&amp;quot;&lt;br /&gt;
#include &amp;quot;fs.h&amp;quot;&lt;br /&gt;
#include &amp;quot;fsdata.h&amp;quot;&lt;/p&gt;

&lt;p&gt;
#define NULL (void *)0&lt;br /&gt;
#include &amp;quot;fsdata.c&amp;quot;&lt;/p&gt;

&lt;p&gt;
#ifdef FS_STATISTICS&lt;br /&gt;
#if FS_STATISTICS == 1&lt;br /&gt;
static u16_t count[FS_NUMFILES];&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;/p&gt;

&lt;p&gt;

/*-----------------------------------------------------------------------------------*/&lt;br /&gt;

static u8_t&lt;br /&gt;
fs_strcmp(const char *str1, const char *str2)&lt;br /&gt;
{ u8_t i; i = 0; loop:&lt;/p&gt;

&lt;p&gt;
if(str2[i] == 0 || str1[i] == &amp;#39;\r&amp;#39; || str1[i] == &amp;#39;\n&amp;#39;) { return 0;
}&lt;/p&gt;

&lt;p&gt;
if(str1[i] != str2[i]) { return 1; }&lt;/p&gt;

&lt;p&gt;
++i; goto loop;&lt;br /&gt;
}
/*-----------------------------------------------------------------------------------*/&lt;br /&gt;

int&lt;br /&gt;
fs_open(const char *name, struct fs_file *file)&lt;br /&gt;
{ #ifdef FS_STATISTICS&lt;br /&gt;
#if FS_STATISTICS == 1 u16_t i = 0;&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;br /&gt;
#endif /* FS_STATISTICS */ struct fsdata_file_noconst *f;&lt;/p&gt;

&lt;p&gt;
for(f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f =
(struct fsdata_file_noconst *)f-&amp;gt;next) {&lt;/p&gt;

&lt;p&gt;
if(fs_strcmp(name, f-&amp;gt;name) == 0) { file-&amp;gt;data = f-&amp;gt;data;
file-&amp;gt;len = f-&amp;gt;len;&lt;br /&gt;
#ifdef FS_STATISTICS&lt;br /&gt;
#if FS_STATISTICS == 1 ++count[i];&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;br /&gt;
#endif /* FS_STATISTICS */ return 1; }&lt;br /&gt;
#ifdef FS_STATISTICS&lt;br /&gt;
#if FS_STATISTICS == 1 ++i;&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;/p&gt;

&lt;p&gt;
} return 0;&lt;br /&gt;
}
/*-----------------------------------------------------------------------------------*/&lt;br /&gt;

void&lt;br /&gt;
fs_init(void)&lt;br /&gt;
{ #ifdef FS_STATISTICS&lt;br /&gt;
#if FS_STATISTICS == 1 u16_t i; for(i = 0; i &amp;lt; FS_NUMFILES; i++) {
count[i] = 0; }&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;br /&gt;
}
/*-----------------------------------------------------------------------------------*/&lt;br /&gt;

#ifdef FS_STATISTICS&lt;br /&gt;
#if FS_STATISTICS == 1&lt;br /&gt;
u16_t fs_count&lt;br /&gt;
(char *name)&lt;br /&gt;
{ struct fsdata_file_noconst *f; u16_t i;&lt;/p&gt;

&lt;p&gt;
i = 0; for(f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f
= (struct fsdata_file_noconst *)f-&amp;gt;next) {&lt;/p&gt;

&lt;p&gt;
if(fs_strcmp(name, f-&amp;gt;name) == 0) { return count[i]; } ++i; }
return 0;&lt;br /&gt;
} #endif /* FS_STATISTICS */&lt;br /&gt;
#endif /* FS_STATISTICS */&lt;/p&gt;

&lt;p&gt;
and fsdata.c code:(only with file_cgi_files definition)&lt;/p&gt;

&lt;p&gt;
#include &amp;quot;fsdata.h&amp;quot;&lt;br /&gt;
#define NULL (void *)0&lt;br /&gt;
static const char data_cgi_files[] = { /* /cgi/files */ 0x2f, 0x63,
0x67, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0, 0x23, 0x20, 0x54,
0x68, 0x69, 0x73, 0x20, 0x73, 0x63, 0x72}&lt;/p&gt;

&lt;p&gt;
const struct fsdata_file file_cgi_files[] = {{NULL,
data_cgi_files, data_cgi_files + 11, sizeof(data_cgi_files) -
11}};&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6200E: Symbol  multiply defined compiling Adam Dunkels uIP</title><link>https://community.arm.com/thread/132318?ContentTypeID=1</link><pubDate>Fri, 22 May 2009 03:02:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e88af2c5-e3da-4051-98d1-bf241ae2bd4d</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Look at the error messages, read them carefully, and &lt;b&gt;think&lt;/b&gt;
what they are telling you!&lt;/p&gt;

&lt;p&gt;
eg,&lt;/p&gt;

&lt;pre&gt;
uIP-2124.axf: Error: L6200E: Symbol file_cgi_files multiply defined (by fsdata.o and fs.o).
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
That&amp;#39;s telling you that both &lt;b&gt;fsdata.o&lt;/b&gt; and &lt;b&gt;fs.o&lt;/b&gt; contain
a definition of &lt;b&gt;file_cgi_files&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Now, &lt;b&gt;fsdata.o&lt;/b&gt; and &lt;b&gt;fs.o&lt;/b&gt; are the Object files produced
by compiling &lt;b&gt;fsdata.c&lt;/b&gt; and &lt;b&gt;fs.c&lt;/b&gt; respectively.&lt;/p&gt;

&lt;p&gt;
Therefore, look at the source code in &lt;b&gt;fsdata.c&lt;/b&gt; and
&lt;b&gt;fs.c&lt;/b&gt; to see if they do, in fact, both contain a definition of
&lt;b&gt;file_cgi_files&lt;/b&gt; - then decide which one to keep, and which to
remove.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>