<br><br>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">ankit jain</b> <span dir="ltr"><<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>></span><br>Date: 2009/2/4<br>
Subject: Re: [CMake] Fwd: Is it necessary to link a executable file?<br>To: Eric Noulard <<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>><br><br><br><br><br>
<div class="gmail_quote">2009/2/4 Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></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 <<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>>:<br>>><br>>> 2009/2/4 ankit jain <<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>>:<br>
>><br>>> > Actually in this case i dont want to create libraries thats why iam<br>>> > wondering whether making only executable is permissble or not?<br>>><br>>> If you use<br>>> ADD_EXECUTABLE<br>
>><br>>> it should work just fine.<br>>> --<br>>> Erk<br>><br>> I am using that only but it gives error because it goea to the folder<br>> /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> </div>
<div>PROJECT(hello)</div>
<div> </div>
<div>ADD_EXECUTABLE(hello h1.C)</div>
<div> </div>
<div>Error iam getting is:</div>
<div> </div>
<div>Linking CXX executable hello<br>/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crt1.o(.text+0x18): In function `_start':<br>: undefined reference to `main'<br></div><font color="#888888">
<div>AJ</div></font></div><br>