[CMake] How to Link in an Object file in Cmake

Ted Kord teddy.kord at gmail.com
Sun Nov 14 08:57:01 EST 2010


With,   add_executable(....  foo.o),   I got:

Undefined symbols:
  "func(thrust::host_vector<float, std::allocator<float> >&)", referenced
from:
      _main in main.cpp.o
ld: symbol(s) not found


Ted


2010/11/14 Alexander Neundorf <a.neundorf-work at gmx.net>

> On Sunday 14 November 2010, Ted Kord wrote:
> > Hello
> >
> > I have an object file which I'd like to link in during compilation of my
> > executable. I've tried adding it to each of the commands below with no
> > success for any:
> >
> > add_executable(....  foo.o)
>
> This should work.
> What error did you get ?
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101114/33635d8a/attachment.htm>


More information about the CMake mailing list