Hello,

I get 15 linkage errors (LNK 2019), that I copied some of them below.
Please also find the code from the link below:

https://github.com/rahelehzarei/sumo

 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

On Sat, Apr 4, 2020 at 6:35 AM Michael Behrisch <o...@behrisch.de> wrote:

> Please post the complete error message and it would be also helpful if
> you can put your code online (maybe in a fork of the sumo repo at github).
>
> Best regards,
> Michael
>
> Am 31.03.20 um 00:30 schrieb Raheleh Zarei:
> > Thanks, my routing algorithm, has two other header files and their .cpp
> > files in addition to the main file that includes the routing algorithm
> > that inherits from SUMOAbstractRouter.
> > I added those 4 other files (headers and .cpp s) to the Cmakelist.txt in
> > src/utils/router and included them in the routing algorithm file, but I
> > get a linkage error. LNK2019. It seems the compiler doesn't see the .cpp
> > files where the definition of the functions is, and I get this linkage
> > error when I call a function of those header files in my main routing
> > algorithm file. Do I need to add my files to any other place in SUMO to
> > make them known to the compiler? I would be grateful if you let me know
> > if you have any idea about this.
> >
> > Best,
> > Raheleh
> >
> >
> >
> > On Thu, Mar 5, 2020 at 3:07 AM Jakob Erdmann <namdre.s...@gmail.com
> > <mailto:namdre.s...@gmail.com>> wrote:
> >
> >     - add a class to src/utils/router that Inherits from
> >     utils/router/SUMOAbstractRouter
> >     - add your router to the selection code in
> >     src/microsim/devices/MSRoutingEngine::initRouter and optionally
> >     src/duarouter/duarouter_main::computeRoutes
> >
> >
> >     Am Mi., 4. März 2020 um 22:42 Uhr schrieb Raheleh Zarei
> >     <raheleh.za...@gmail.com <mailto:raheleh.za...@gmail.com>>:
> >
> >         Hi
> >
> >         May I know the procedure of adding a new routing algorithm. I
> >         would like to add a new routing algorithm like CH but with three
> >         phases.
> >
> >         Thanks,
> >         Raheleh
> >
> >         --
> >         *RAZ*
> >
> >
> >         --
> >         *RAZ*
> >         _______________________________________________
> >         sumo-dev mailing list
> >         sumo-dev@eclipse.org <mailto:sumo-dev@eclipse.org>
> >         To change your delivery options, retrieve your password, or
> >         unsubscribe from this list, visit
> >         https://www.eclipse.org/mailman/listinfo/sumo-dev
> >
> >     _______________________________________________
> >     sumo-dev mailing list
> >     sumo-dev@eclipse.org <mailto:sumo-dev@eclipse.org>
> >     To change your delivery options, retrieve your password, or
> >     unsubscribe from this list, visit
> >     https://www.eclipse.org/mailman/listinfo/sumo-dev
> >
> >
> >
> > --
> > *RAZ*
> >
> > _______________________________________________
> > sumo-dev mailing list
> > sumo-dev@eclipse.org
> > To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-dev
> >
>
>
> _______________________________________________
> sumo-dev mailing list
> sumo-dev@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-dev
>


-- 
*RAZ*
_______________________________________________
sumo-dev mailing list
sumo-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-dev

Reply via email to