Hi Team,
    i was able to build chrono in ubuntu 20.04 with vehicle cosimulation 
irrlicht postprocess sensor ..But when i try to build the template project 
of chrono (template_project_vehicle_cosim) i am facing the below issue.

Can you please help me rectify this issue? 


[ 50%] Linking CXX executable vehicle_cosim
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`MyTerrain::Render(double)':
vehicle_cosim.cpp:(.text+0x148): undefined reference to 
`ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text+0x14d): undefined reference to 
`MPI_Abort'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`MyTerrain::~MyTerrain()':
vehicle_cosim.cpp:(.text+0x6b6): undefined reference to `vtable for 
chrono::vehicle::ChVehicleCosimTerrainNode'
/usr/bin/ld: vehicle_cosim.cpp:(.text+0x840): undefined reference to 
`vtable for chrono::vehicle::ChVehicleCosimBaseNode'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`MyTerrain::MyTerrain(double, double)':
vehicle_cosim.cpp:(.text+0xa1c): undefined reference to 
`chrono::vehicle::ChVehicleCosimTerrainNode::ChVehicleCosimTerrainNode(double, 
double)'
....
...
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI8Cartcomm5CloneEv[_ZNK3MPI8Cartcomm5CloneEv]+0x3b):
 
undefined reference to `MPI::Comm::Comm()'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI8Cartcomm5CloneEv[_ZNK3MPI8Cartcomm5CloneEv]+0x58):
 
undefined reference to `MPI_Initialized'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI8Cartcomm5CloneEv[_ZNK3MPI8Cartcomm5CloneEv]+0x6c):
 
undefined reference to `ompi_mpi_comm_null'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI8Cartcomm5CloneEv[_ZNK3MPI8Cartcomm5CloneEv]+0x7b):
 
undefined reference to `MPI_Topo_test'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`MPI::Intracomm::Create_cart(int, int const*, bool const*, bool) const':
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm11Create_cartEiPKiPKbb[_ZNK3MPI9Intracomm11Create_cartEiPKiPKbb]+0x9a):
 
undefined reference to `MPI_Cart_create'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm11Create_cartEiPKiPKbb[_ZNK3MPI9Intracomm11Create_cartEiPKiPKbb]+0xaa):
 
undefined reference to `MPI::Comm::Comm()'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm11Create_cartEiPKiPKbb[_ZNK3MPI9Intracomm11Create_cartEiPKiPKbb]+0xc7):
 
undefined reference to `MPI_Initialized'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm11Create_cartEiPKiPKbb[_ZNK3MPI9Intracomm11Create_cartEiPKiPKbb]+0xdb):
 
undefined reference to `ompi_mpi_comm_null'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm11Create_cartEiPKiPKbb[_ZNK3MPI9Intracomm11Create_cartEiPKiPKbb]+0xea):
 
undefined reference to `MPI_Topo_test'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`MPI::Intercomm::Merge(bool) const':
vehicle_cosim.cpp:(.text._ZNK3MPI9Intercomm5MergeEb[_ZNK3MPI9Intercomm5MergeEb]+0x13):
 
undefined reference to `ompi_mpi_comm_null'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intercomm5MergeEb[_ZNK3MPI9Intercomm5MergeEb]+0x39):
 
undefined reference to `MPI_Intercomm_merge'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intercomm5MergeEb[_ZNK3MPI9Intercomm5MergeEb]+0x46):
 
undefined reference to `MPI::Comm::Comm()'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intercomm5MergeEb[_ZNK3MPI9Intercomm5MergeEb]+0x63):
 
undefined reference to `MPI_Initialized'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intercomm5MergeEb[_ZNK3MPI9Intercomm5MergeEb]+0xa1):
 
undefined reference to `MPI_Comm_test_inter'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`MPI::Intracomm::Create(MPI::Group const&) const':
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[_ZNK3MPI9Intracomm6CreateERKNS_5GroupE]+0x13):
 
undefined reference to `ompi_mpi_comm_null'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[_ZNK3MPI9Intracomm6CreateERKNS_5GroupE]+0x3a):
 
undefined reference to `MPI_Comm_create'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[_ZNK3MPI9Intracomm6CreateERKNS_5GroupE]+0x47):
 
undefined reference to `MPI::Comm::Comm()'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[_ZNK3MPI9Intracomm6CreateERKNS_5GroupE]+0x64):
 
undefined reference to `MPI_Initialized'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[_ZNK3MPI9Intracomm6CreateERKNS_5GroupE]+0xa9):
 
undefined reference to `MPI_Comm_test_inter'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`MPI::Intracomm::Split(int, int) const':
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm5SplitEii[_ZNK3MPI9Intracomm5SplitEii]+0x14):
 
undefined reference to `ompi_mpi_comm_null'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm5SplitEii[_ZNK3MPI9Intracomm5SplitEii]+0x37):
 
undefined reference to `MPI_Comm_split'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm5SplitEii[_ZNK3MPI9Intracomm5SplitEii]+0x44):
 
undefined reference to `MPI::Comm::Comm()'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm5SplitEii[_ZNK3MPI9Intracomm5SplitEii]+0x61):
 
undefined reference to `MPI_Initialized'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZNK3MPI9Intracomm5SplitEii[_ZNK3MPI9Intracomm5SplitEii]+0xa1):
 
undefined reference to `MPI_Comm_test_inter'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`chrono::vehicle::ChVehicleCosimOtherNode::~ChVehicleCosimOtherNode()':
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle23ChVehicleCosimOtherNodeD2Ev[_ZN6chrono7vehicle23ChVehicleCosimOtherNodeD5Ev]+0x7):
 
undefined reference to `vtable for chrono::vehicle::ChVehicleCosimBaseNode'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`chrono::vehicle::ChVehicleCosimOtherNode::~ChVehicleCosimOtherNode()':
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle23ChVehicleCosimOtherNodeD0Ev[_ZN6chrono7vehicle23ChVehicleCosimOtherNodeD5Ev]+0x7):
 
undefined reference to `vtable for chrono::vehicle::ChVehicleCosimBaseNode'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`std::_Sp_counted_ptr_inplace<chrono::vehicle::ChVehicleCosimDBPRigImposedSlip, 
std::allocator<chrono::vehicle::ChVehicleCosimDBPRigImposedSlip>, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose()':
vehicle_cosim.cpp:(.text._ZNSt23_Sp_counted_ptr_inplaceIN6chrono7vehicle31ChVehicleCosimDBPRigImposedSlipESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt23_Sp_counted_ptr_inplaceIN6chrono7vehicle31ChVehicleCosimDBPRigImposedSlipESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x2c):
 
undefined reference to `vtable for 
chrono::vehicle::ChVehicleCosimDBPRigImposedSlip'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`chrono::vehicle::ChVehicleCosimDBPRigImposedSlip::~ChVehicleCosimDBPRigImposedSlip()':
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle31ChVehicleCosimDBPRigImposedSlipD2Ev[_ZN6chrono7vehicle31ChVehicleCosimDBPRigImposedSlipD5Ev]+0x9):
 
undefined reference to `vtable for 
chrono::vehicle::ChVehicleCosimDBPRigImposedSlip'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`chrono::vehicle::ChVehicleCosimTerrainNode::~ChVehicleCosimTerrainNode()':
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD2Ev[_ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD5Ev]+0x7):
 
undefined reference to `vtable for 
chrono::vehicle::ChVehicleCosimTerrainNode'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD2Ev[_ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD5Ev]+0x1a0):
 
undefined reference to `vtable for chrono::vehicle::ChVehicleCosimBaseNode'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`chrono::vehicle::ChVehicleCosimTerrainNode::~ChVehicleCosimTerrainNode()':
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD0Ev[_ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD5Ev]+0x7):
 
undefined reference to `vtable for 
chrono::vehicle::ChVehicleCosimTerrainNode'
/usr/bin/ld: 
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD0Ev[_ZN6chrono7vehicle25ChVehicleCosimTerrainNodeD5Ev]+0x1a4):
 
undefined reference to `vtable for chrono::vehicle::ChVehicleCosimBaseNode'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`chrono::vehicle::ChVehicleCosimDBPRigImposedSlip::~ChVehicleCosimDBPRigImposedSlip()':
vehicle_cosim.cpp:(.text._ZN6chrono7vehicle31ChVehicleCosimDBPRigImposedSlipD0Ev[_ZN6chrono7vehicle31ChVehicleCosimDBPRigImposedSlipD5Ev]+0x9):
 
undefined reference to `vtable for 
chrono::vehicle::ChVehicleCosimDBPRigImposedSlip'
/usr/bin/ld: CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o: in function 
`main':
vehicle_cosim.cpp:(.text.startup+0x75): undefined reference to `MPI_Init'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x81): undefined reference to 
`ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x86): undefined reference to 
`MPI_Comm_size'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x9a): undefined reference to 
`ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x9f): undefined reference to 
`MPI_Comm_rank'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0xac): undefined reference to 
`MPI_Get_processor_name'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0xca): undefined reference to 
`ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0xd5): undefined reference to 
`MPI_Abort'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x167): undefined reference 
to `ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x16c): undefined reference 
to `MPI_Barrier'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x1d1): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimBaseNode::ChVehicleCosimBaseNode(std::__cxx11::basic_string<char,
 
std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x21b): undefined reference 
to `ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x220): undefined reference 
to `MPI_Barrier'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x2e3): undefined reference 
to `chrono::vehicle::ChVehicleCosimBaseNode::GetNodeTypeString[abi:cxx11]() 
const'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x339): undefined reference 
to `chrono::vehicle::ChVehicleCosimBaseNode::IsCosimNode() const'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x408): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimBaseNode::SetOutDir(std::__cxx11::basic_string<char,
 
std::char_traits<char>, std::allocator<char> > const&, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x41d): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimTerrainNode::EnableRuntimeVisualization(bool, 
double)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x458): undefined reference 
to `ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x45d): undefined reference 
to `MPI_Barrier'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x465): undefined reference 
to `chrono::vehicle::ChVehicleCosimBaseNode::IsCosimNode() const'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x655): undefined reference 
to `MPI_Finalize'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x704): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimDBPRigImposedSlip::ChVehicleCosimDBPRigImposedSlip(chrono::vehicle::ChVehicleCosimDBPRigImposedSlip::ActuationType,
 
double, double)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x724): undefined reference 
to `chrono::vehicle::ChVehicleCosimRigNode::ChVehicleCosimRigNode()'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x743): undefined reference 
to `chrono::vehicle::ChVehicleCosimMBSNode::SetNumThreads(int)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x75f): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimBaseNode::SetOutDir(std::__cxx11::basic_string<char,
 
std::char_traits<char>, std::allocator<char> > const&, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x795): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimMBSNode::AttachDrawbarPullRig(std::shared_ptr<chrono::vehicle::ChVehicleCosimDBPRig>)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x7e1): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimTireNodeBypass::ChVehicleCosimTireNodeBypass(int,
 
double, double, double)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x800): undefined reference 
to `chrono::vehicle::ChVehicleCosimTireNode::SetNumThreads(int)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x80e): undefined reference 
to 
`chrono::vehicle::ChVehicleCosimBaseNode::SetOutDir(std::__cxx11::basic_string<char,
 
std::char_traits<char>, std::allocator<char> > const&, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&)'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x85b): undefined reference 
to `ompi_mpi_comm_world'
/usr/bin/ld: vehicle_cosim.cpp:(.text.startup+0x860): undefined reference 
to `MPI_Abort'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTIN6chrono7vehicle23ChVehicleCosimOtherNodeE[_ZTIN6chrono7vehicle23ChVehicleCosimOtherNodeE]+0x10):
 
undefined reference to `typeinfo for 
chrono::vehicle::ChVehicleCosimBaseNode'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTI9MyTerrain[_ZTI9MyTerrain]+0x10):
 
undefined reference to `typeinfo for 
chrono::vehicle::ChVehicleCosimTerrainNode'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78):
 
undefined reference to `MPI::Datatype::Free()'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48):
 
undefined reference to `MPI::Win::Free()'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTVN6chrono7vehicle23ChVehicleCosimOtherNodeE[_ZTVN6chrono7vehicle23ChVehicleCosimOtherNodeE]+0x28):
 
undefined reference to 
`chrono::vehicle::ChVehicleCosimBaseNode::Initialize()'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTV9MyTerrain[_ZTV9MyTerrain]+0x28):
 
undefined reference to 
`chrono::vehicle::ChVehicleCosimTerrainNode::Initialize()'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTV9MyTerrain[_ZTV9MyTerrain]+0x30):
 
undefined reference to 
`chrono::vehicle::ChVehicleCosimTerrainNode::Synchronize(int, double)'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTV9MyTerrain[_ZTV9MyTerrain]+0x38):
 
undefined reference to 
`chrono::vehicle::ChVehicleCosimTerrainNode::Advance(double)'
/usr/bin/ld: 
CMakeFiles/vehicle_cosim.dir/vehicle_cosim.cpp.o:(.data.rel.ro._ZTV9MyTerrain[_ZTV9MyTerrain]+0x40):
 
undefined reference to 
`chrono::vehicle::ChVehicleCosimTerrainNode::OutputData(int)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/vehicle_cosim.dir/build.make:108: vehicle_cosim] 
Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/vehicle_cosim.dir/all] 
Error 2
make: *** [Makefile:91: all] Error 2

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/762c205e-cd29-4b04-bfc1-698ccade9639n%40googlegroups.com.

Reply via email to