Vortexje compilation error on Centos 6.6

 

First:

yum install eigen3-devel  (probably from epel)
module load cmake/2.8.12.2  # installation here

I downloaded vortexje from:

git clone git://git.baayen-heinz.com/Vortexje.git
cd Vortexje
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/vortexje/git_20150326
make -j4

then I got this problem:

[ 93%] Building CXX object examples/hawt/CMakeFiles/hawt.dir/hawt.cpp.o
/root/build/Vortexje/examples/hawt/hawt.cpp: In function \u2018int main(int, char**)\u2019:
/root/build/Vortexje/examples/hawt/hawt.cpp:286: error: call of overloaded \u2018moment(std::shared_ptr<HAWT>&, Eigen::Vector3d&)\u2019 is ambiguous
/root/build/Vortexje/./vortexje/solver.hpp:112: note: candidates are: Eigen::Vector3d Vortexje::Solver::moment(const std::shared_ptr<Vortexje::Body>&, const Eigen::Vector3d&) const
/root/build/Vortexje/./vortexje/solver.hpp:113: note: Eigen::Vector3d Vortexje::Solver::moment(const std::shared_ptr<Vortexje::Surface>&, const Eigen::Vector3d&) const
make[2]: *** [examples/hawt/CMakeFiles/hawt.dir/hawt.cpp.o] Error 1
make[1]: *** [examples/hawt/CMakeFiles/hawt.dir/all] Error 2
make: *** [all] Error 2

which i resolved with a dynamic cast of the hawt and vawt object (in hawt.cpp and vawt.cpp):

// Log shaft moment:
Vector3d M = solver.moment( dynamic_pointer_cast< Vortexje::Body >(hawt), position);

module file: /etc/modulefiles/vortexje/git_20150326

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##
prepend-path CPLUS_INCLUDE_PATH /opt/vortexje/git_20150326/include/vortexje/
prepend-path LD_LIBRARY_PATH /opt/vortexje/git_20150326/lib

Lämna ett svar

Din e-postadress kommer inte publiceras. Obligatoriska fält är märkta *