<?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: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/31425/error-l6218e-undefined-symbol-main-referred-from-rtentry2-o</link><description> 
Hello!!!!!!!!! 
I have posted my program and the building message and errors
below.Please solve the following errors and warning. 

 
#include &amp;lt;lpc21xx.h&amp;gt;

#define RS 1&amp;lt;&amp;lt;4 // for write operation R/W pin of lcd is zero , so it is always grounded and</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Error: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/thread/136974?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2013 06:17:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f639b67c-0a15-4413-84fa-dd9c5f335d9a</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Take a look for an obvious name in the Project options...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/thread/128069?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2013 03:31:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2ba1b2e7-bde1-4c43-a8ef-4682a3b896c5</guid><dc:creator>Anand Dabhi</dc:creator><description>&lt;p&gt;&lt;p&gt;
But how we can tell the compiler that I am building library not
program?????&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/thread/119988?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2013 00:40:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5ba22e09-4157-45e6-840f-b3bfea5f3f5b</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
But you &lt;i&gt;&lt;b&gt;do&lt;/b&gt;&lt;/i&gt; need to tell the tools that you are
building a library and not a &amp;quot;program&amp;quot; - so that they know not to
require a main()...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/thread/106926?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2013 00:36:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1ce615ae-0b89-4c58-baaa-47ed3a6c01f5</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Lol - well, whatever you think you are doing, the compiler think
you are wrong. And the compiler is almost always correct.&lt;/p&gt;

&lt;p&gt;
If you are creating a library, then you don&amp;#39;t need a main(). If
you are creating a program, then you need a main() however much you
move code and declarations between C and header files.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/thread/106925?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2013 22:21:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:77ed64dd-0c10-4ddc-8add-60776a1d0cdc</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
I hope that the code you posted is not intended to go into a
&lt;b&gt;header&lt;/b&gt; file?!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;Hence it doesn&amp;#39;t require main function&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Sure, a header file itself won&amp;#39;t have a main() - but a
&lt;b&gt;program&lt;/b&gt; must!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/thread/81044?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2013 20:44:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:be5957e2-182b-44a0-8d70-dd68299d167f</guid><dc:creator>Anand Dabhi</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am creating header file for 16x2 LCD. Hence it doesn&amp;#39;t require
main function.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: L6218E: Undefined symbol main (referred from rtentry2.o).</title><link>https://community.arm.com/thread/68135?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2013 12:39:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5c315ece-82b5-47c8-af51-ba58721bdae4</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Do you feel it is too hard to solve the issues yourself?&lt;/p&gt;

&lt;p&gt;
How about having a last line that ends without a newline - ever
tried to add a newline?&lt;/p&gt;

&lt;p&gt;
Undefines symbol main? Since you are well read on C programming -
can you show us where you managed to hide your main(). Or where did
you expect your program to start running?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>