FIAS . Impressum . Privacy

linking

Matthias Kretz [please enable javascript to see the address]
Fri Sep 27 16:29:36 CEST 2013


On Friday 27 September 2013 15:02:45 Raman Sehgal wrote:
> Hello Matthias,
> I am asking a very simple and stupid question.
> 
> I am not able to compile this simple
> Vc program
> 
> //---------------------------------------------------
> #include <Vc/Vc>
> #include "Vc/vector.h"

You don't need this include. With <Vc/Vc> you basically get everything.

> #include <iostream>
> #include <iomanip>
> #include <cstdlib>
> //using Vc::float_v;
> //using namespace std;
> int main()
> {
>  std::cout << Vc::float_v::Size;
> //Vc::double_m dist_mask(Vc::Zero);
> //std::cout<<dist_mask;
> return 0;
> }
> ------------------------------------------------------
> 
> could you please help me with some CMakeLists.txt file
> so that i can compile this

Sure. You forgot to link against libVc. It might be a bit surprising, but 
including <Vc/Vc> alone suffices to require linking to libVc.

Add:
target_link_libraries(vc1 ${Vc_LIBRARIES}

Cheers,
 Matthias
-- 
Dipl.-Phys. Matthias Kretz

Web:   http://compeng.uni-frankfurt.de/?mkretz

SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20130927/018e16ed/attachment.pgp>


More information about the Vc mailing list
FIAS . Impressum . Privacy