<br><br>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">ankit jain</b> <span dir="ltr">&lt;<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>&gt;</span><br>Date: 2009/2/4<br>
Subject: Re: [CMake] Fwd: Is it necessary to link a executable file?<br>To: Eric Noulard &lt;<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>&gt;<br><br><br><br><br>
<div class="gmail_quote">2009/2/4 Eric Noulard <span dir="ltr">&lt;<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>&gt;</span> 
<div>
<div></div>
<div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>2009/2/4 ankit jain &lt;<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>&gt;:<br>&gt;&gt;<br>&gt;&gt; 2009/2/4 ankit jain &lt;<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>&gt;:<br>
&gt;&gt;<br>&gt;&gt; &gt; Actually in this case i dont want to create libraries thats why iam<br>&gt;&gt; &gt; wondering whether making only executable is permissble or not?<br>&gt;&gt;<br>&gt;&gt; If you use<br>&gt;&gt; ADD_EXECUTABLE<br>
&gt;&gt;<br>&gt;&gt; it should work just fine.<br>&gt;&gt; --<br>&gt;&gt; Erk<br>&gt;<br>&gt; I am using that only but it gives error because it goea to the folder<br>&gt; /usr/lib and try to link it with some .o file.<br>
<br></div>As already told by others here you should give us<br>more precise informations about your problem. At least,<br><br>- the CMakeLists.txt you are using or the portion which seems to lead<br>to an error.<br>- the verbatim copy of the error you are observing.<br>
<br>without that we may not help you.<br><font color="#888888"><br>--<br>Erk<br></font></blockquote></div></div></div>
<div><br>The CMakeLists iam using contains:</div>
<div>&nbsp;</div>
<div>PROJECT(hello)</div>
<div>&nbsp;</div>
<div>ADD_EXECUTABLE(hello h1.C)</div>
<div>&nbsp;</div>
<div>Error iam getting is:</div>
<div>&nbsp;</div>
<div>Linking CXX executable hello<br>/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crt1.o(.text+0x18): In function `_start&#39;:<br>: undefined reference to `main&#39;<br></div><font color="#888888">
<div>AJ</div></font></div><br>