Hello,
I was trying to use Routing Service as a library. I tried with command line Executable which runs ok, but when I am trying to use routing service as library, it gives me the error. I tried this program
using namespace rti::routing; ServiceProperty property; uint32_t running_seconds = 60; property.cfg_file("my_routing_service_cfg.xml"); property.service_name("my_routing_service"); }
I am able to build the above program, but when I do this
Service service(property); service.start();
It gives me this error
Error LNK2019 unresolved external symbol GetPerformanceInfo referenced in function ROUTERHost_getMemoryUsage ROSRoutingService C:\routing_service_library\build\rtiroutingservicezd.lib(MonitorableApplication.obj)
Any help would highly be appreciated. Thanks.
Hmm, "GetPerformanceInfo" is a function in the Windows Psapi.lib.
https://learn.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getperformanceinfo
Try adding that lib to your linker. You may also need to add the following macro, –DPSAPI_VERSION=1.
oh yes, its working now. Thanks a lot.
Thanks for letting me know.