ppconsul | C client for Consul | Configuration Management library
kandi X-RAY | ppconsul Summary
kandi X-RAY | ppconsul Summary
A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ppconsul
ppconsul Key Features
ppconsul Examples and Code Snippets
Community Discussions
Trending Discussions on ppconsul
QUESTION
I'm a beginner to cpp and trying to use a cpp library called ppconsul(https://github.com/oliora/ppconsul ). This library has dependency to some of other libraries like (boost and curl). I have build ppconsul with all its dependencies and trying to use ppconsul executable in a new project. When I try to build the new project, I'm getting some linker issue like below.
error LNK2001: unresolved external symbol "public: virtual char const * thiscall ppconsul::BadStatus::what(void)const " (?what@BadStatus@ppconsul@@UBEPBDXZ) 1>ConsulApp.obj : error LNK2019: unresolved external symbol "class std::basic_string,class std::allocator > __cdecl ppconsul::helpers::encodeUrl(class std::basic_string,class std::allocator > const &)" (?encodeUrl@helpers@ppconsul@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z) referenced in function "void __cdecl ppconsul::parameters::detail::printParameter(class std::basic_ostream > &,class std::basic_string,class std::allocator > const &,struct ppconsul::kw::dc_keyword)" (??$printParameter@Udc_keyword__@kw@ppconsul@@@detail@parameters@ppconsul@@YAXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@Udc_keyword__@kw@2@@Z)
I tried to link the project and change the visual studio but nothing worked. Anybody has any idea about this linker issue? TIA, Prassi
...ANSWER
Answered 2018-Apr-05 at 22:33Issue resolved- Refer this thread github.com/oliora/ppconsul/issues/24
build ppconsul as a static library by passing -DBUILD_STATIC_LIB=ON to CMake.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ppconsul
You may want to set the following CMake variables on the command line:. To change where CMake looks for Boost, pass -DBOOST_ROOT=<path_to_boost> parameter to CMake or set BOOST_ROOT environment variable. To change where CMake looks for libCURL, pass -DCURL_ROOT=<path_to_curl> parameter to CMake or set CURL_ROOT environment variable. To change default install location, pass -DCMAKE_INSTALL_PREFIX=<prefix> parameter. To build Ppconsul as static library, pass -DBUILD_STATIC_LIB=ON parameter. Note that in this case you have to link with json11 static library as well (json11 library is build as part of Ppconsul build.).
Build it first as described above then run.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page