[CMake] Fwd: Fwd: Is it necessary to link a executable file?

ankit jain ankitguddu at gmail.com
Wed Feb 4 05:21:36 EST 2009


---------- Forwarded message ----------
From: ankit jain <ankitguddu at gmail.com>
Date: 2009/2/4
Subject: Re: [CMake] Fwd: Is it necessary to link a executable file?
To: Eric Noulard <eric.noulard at gmail.com>




2009/2/4 Eric Noulard <eric.noulard at gmail.com>

 2009/2/4 ankit jain <ankitguddu at gmail.com>:
> >>
> >> 2009/2/4 ankit jain <ankitguddu at gmail.com>:
> >>
> >> > Actually in this case i dont want to create libraries thats why iam
> >> > wondering whether making only executable is permissble or not?
> >>
> >> If you use
> >> ADD_EXECUTABLE
> >>
> >> it should work just fine.
> >> --
> >> Erk
> >
> > I am using that only but it gives error because it goea to the folder
> > /usr/lib and try to link it with some .o file.
>
> As already told by others here you should give us
> more precise informations about your problem. At least,
>
> - the CMakeLists.txt you are using or the portion which seems to lead
> to an error.
> - the verbatim copy of the error you are observing.
>
> without that we may not help you.
>
> --
> Erk
>

The CMakeLists iam using contains:

PROJECT(hello)

ADD_EXECUTABLE(hello h1.C)

Error iam getting is:

Linking CXX executable hello
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crt1.o(.text+0x18): In
function `_start':
: undefined reference to `main'
AJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090204/c076ce8b/attachment.htm>


More information about the CMake mailing list