Hello,
I get 15 linkage errors (LNK 2019), that I copied some of them below.
Please also find the code from the link below:
I added another project with either dll or lib type and put all the necessary header and .cpp files in it. In build order, RoutingKitdll project will build before z_util_router. I also added RoutingKitdll as the reference in z_util_router project.
It seems my program (CCHRouter.h) can't see the definition of functions that are in .cpp files in the RoutingKitdll project.
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: __thiscall RoutingKit::BitVector::~BitVector(void)" (??1BitVector@RoutingKit@@QAE@XZ) referenced in function "public: __thiscall RoutingKit::CustomizableContractionHierarchy::~CustomizableContractionHierarchy(void)" (??1CustomizableContractionHierarchy@RoutingKit@@QAE@XZ) sumo-gui R:\Education\SUMOProj\build\CMAKE\src\microsim_devices.lib(MSRoutingEngine.obj) 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "class std::vector<unsigned int,class std::allocator<unsigned int> > __cdecl RoutingKit::compute_nested_node_dissection_order_using_inertial_flow(unsigned int,class std::vector<unsigned int,class std::allocator<unsigned int> > const &,class std::vector<unsigned int,class std::allocator<unsigned int> > const &,class std::vector<float,class std::allocator<float> > const &,class std::vector<float,class std::allocator<float> > const &,class std::function<void __cdecl(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)> const &)" (?compute_nested_node_dissection_order_using_inertial_flow@RoutingKit@@YA?AV?$vector@IV?$allocator@I@std@@@std@@IABV23@0ABV?$vector@MV?$allocator@M@std@@@3@1ABV?$function@$$A6AXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@3@@Z) referenced in function "public: __thiscall CCHRouter<class MSEdge,class SUMOVehicle>::CCHRouter<class MSEdge,class SUMOVehicle>(class std::vector<class MSEdge *,class std::allocator<class MSEdge *> > const &,bool,double (__cdecl*)(class MSEdge const * const,class SUMOVehicle const * const,double),enum SUMOVehicleClass,__int64,bool,bool)" (??0?$CCHRouter@VMSEdge@@VSUMOVehicle@@@@QAE@ABV?$vector@PAVMSEdge@@V?$allocator@PAVMSEdge@@@std@@@std@@_NP6ANQBVMSEdge@@QBVSUMOVehicle@@N@ZW4SUMOVehicleClass@@_J_N7@Z) sumo-gui R:\Education\SUMOProj\build\CMAKE\src\microsim_devices.lib(MSRoutingEngine.obj) 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: __thiscall RoutingKit::CustomizableContractionHierarchy::CustomizableContractionHierarchy(class std::vector<unsigned int,class std::allocator<unsigned int> >,class std::vector<unsigned int,class std::allocator<unsigned int> >,class std::vector<unsigned int,class std::allocator<unsigned int> >,class std::function<void __cdecl(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)>,bool)" (??0CustomizableContractionHierarchy@RoutingKit@@QAE@V?$vector@IV?$allocator@I@std@@@std@@00V?$function@$$A6AXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@3@_N@Z) referenced in function "public: __thiscall CCHRouter<class MSEdge,class SUMOVehicle>::CCHRouter<class MSEdge,class SUMOVehicle>(class std::vector<class MSEdge *,class std::allocator<class MSEdge *> > const &,bool,double (__cdecl*)(class MSEdge const * const,class SUMOVehicle const * const,double),enum SUMOVehicleClass,__int64,bool,bool)" (??0?$CCHRouter@VMSEdge@@VSUMOVehicle@@@@QAE@ABV?$vector@PAVMSEdge@@V?$allocator@PAVMSEdge@@@std@@@std@@_NP6ANQBVMSEdge@@QBVSUMOVehicle@@N@ZW4SUMOVehicleClass@@_J_N7@Z) sumo-gui R:\Education\SUMOProj\build\CMAKE\src\microsim_devices.lib(MSRoutingEngine.obj) 1
Thanks,
Raheleh