FIAS . Impressum . Privacy

No subject

Raman Sehgal [please enable javascript to see the address]
Fri Sep 27 11:32:45 CEST 2013


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"
#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

currently i m using the attached CMakeLists.txt file
during compilation i am getting following error
*****************************************************************************
Scanning dependencies of target vc1
[100%] Building CXX object CMakeFiles/vc1.dir/vc1.cpp.o
Linking CXX executable vc1
CMakeFiles/vc1.dir/vc1.cpp.o: In function `_GLOBAL__sub_I_main':
vc1.cpp:(.text.startup+0x34): undefined reference to
`Vc::checkLibraryAbi(unsigned int, unsigned int, char const*)'
collect2: error: ld returned 1 exit status
make[2]: *** [vc1] Error 1
make[1]: *** [CMakeFiles/vc1.dir/all] Error 2
make: *** [all] Error 2
*****************************************************************************


Please suggest me how to resolve this issue



Regards,
Raman Sehgal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20130927/b7157e92/attachment.html>
-------------- next part --------------
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(VCtest)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/modules)

find_package(Vc)
if ( VC_FOUND )
include_directories(${VC_INCLUDE_DIR})
endif()

file(GLOB sources vc1.cpp )


if(CMAKE_BUILD_TYPE MATCHES "Debug")
        set( BASEFLAGS "-O0 -fpermissive" )
else()
# set baseflags as a function of the compiler:
      message(STATUS "setting up compilation flags to compile vectorized geometry")
 if( CMAKE_COMPILER_IS_GNUCXX )
      message(STATUS "configuration compile flags for gcc")
      set( BASEFLAGS "-Ofast -ftree-vectorize -ftree-vectorizer-verbose=0 -fpermissive" )
  elseif( CMAKE_CXX_COMPILER_ID STREQUAL Intel )
      message(STATUS "configuring compile flags for Intel compiler")
      set( BASEFLAGS "-Ofast -restrict -vec-report=2" )
  endif()
endif()

if( VC_FOUND )
  add_definitions( "-DVEC_EXTENSIONS" )
  set( BASEVCFLAGS "-std=c++11 -fabi-version=6" )
endif()

if( USEAVX )
        set_source_files_properties(${sources} PROPERTIES COMPILE_FLAGS "${BASEFLAGS} ${BASEVCFLAGS} -mavx")
else()
        set_source_files_properties(${sources} PROPERTIES COMPILE_FLAGS "${BASEFLAGS} ${BASEVCFLAGS} -msse4.1")
endif()

add_executable( vc1 vc1.cpp )



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