Closed saeedm31 closed 3 years ago
What compiler are you using?
Hi there, The problem was with the version of gcc compiler indeed (in mac os is gcc 4.2.1 or older) I forced the "make" to use a specific version: export CXX=g++-mp-5 export CC=gcc-5 or: make CXX=g++-mp-5 CC=gcc-5
Cheers, S
(base) shojjatpanah@mac-shojj-dock ~ % cd kima (base) shojjatpanah@mac-shojj-dock kima % make Compiling: src/RVmodel.cpp In file included from src/RVmodel.cpp:1: src/RVmodel.h:137:81: error: non-constant-expression cannot be narrowed from type 'int' to 'std::1::vector<std::1::shared_ptr,
std::1::allocator<std::1::shared_ptr > >::size_type' (aka 'unsigned long') in initializer list
[-Wc++11-narrowing]
std::vector<std::shared_ptr> KO_Pprior {n_known_object};
^> KO_Pprior {n_known_object};
^( )
src/RVmodel.h:138:81: error: non-constant-expression cannot be narrowed from type 'int' to
'std::1::vector<std::1::shared_ptr,
std::1::allocator<std::1::shared_ptr > >::size_type' (aka 'unsigned long') in initializer list
[-Wc++11-narrowing]
std::vector<std::shared_ptr> KO_Kprior {n_known_object};
^> KO_Kprior {n_known_object};
^( )
src/RVmodel.h:139:81: error: non-constant-expression cannot be narrowed from type 'int' to
'std::1::vector<std::1::shared_ptr,
std::1::allocator<std::1::shared_ptr > >::size_type' (aka 'unsigned long') in initializer list
[-Wc++11-narrowing]
std::vector<std::shared_ptr> KO_eprior {n_known_object};
^> KO_eprior {n_known_object};
^( )
src/RVmodel.h:140:83: error: non-constant-expression cannot be narrowed from type 'int' to
'std::1::vector<std::1::shared_ptr,
std::1::allocator<std::1::shared_ptr > >::size_type' (aka 'unsigned long') in initializer list
[-Wc++11-narrowing]
std::vector<std::shared_ptr> KO_phiprior {n_known_object};
^> KO_phiprior {n_known_object};
^( )
src/RVmodel.h:141:81: error: non-constant-expression cannot be narrowed from type 'int' to
'std::1::vector<std::1::shared_ptr,
std::1::allocator<std::1::shared_ptr > >::size_type' (aka 'unsigned long') in initializer list
[-Wc++11-narrowing]
std::vector<std::shared_ptr> KO_wprior {n_known_object};
^> KO_wprior {n_known_object};
^( )
5 errors generated.
make: *** [src/RVmodel.o] Error 1
(base) shojjatpanah@mac-shojj-dock kima %
~~~~~ src/RVmodel.h:137:81: note: insert an explicit cast to silence this issue std::vector<std::shared_ptr~~~~~ static_cast~~~~~ src/RVmodel.h:138:81: note: insert an explicit cast to silence this issue std::vector<std::shared_ptr~~~~~ static_cast~~~~~ src/RVmodel.h:139:81: note: insert an explicit cast to silence this issue std::vector<std::shared_ptr~~~~~ static_cast~~~~~ src/RVmodel.h:140:83: note: insert an explicit cast to silence this issue std::vector<std::shared_ptr~~~~~ static_cast~~~~~ src/RVmodel.h:141:81: note: insert an explicit cast to silence this issue std::vector<std::shared_ptr~~~~~ static_cast