GithubHelp home page GithubHelp logo

micro-service's People

Contributors

ivanleapfactor avatar ivanmejiarocha avatar ubhargavtej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

micro-service's Issues

RHEL7 needs target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

I tried building on RHEL7 (using cmake3 and devtoolset-7) and got this error...

/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: ../libs/cpprestsdk/build.release/Binaries/libcpprest.a(http_server_asio.cpp.o): undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
//lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/micro-service.dir/build.make:142: micro-service] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/micro-service.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I got around the error by adding "target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})" to CMakeLists.txt

non-virtual dtors in classes having virtual methods

...maybe this is not a problem in this concrete example, but when someone is deriving code from it and is extending it, it might lead to leaks when dtors of derived classes are not called properly (Item 7 in Scott Meyers Effective C++). See cfx::Controller and cfx::BasicController.

Build Error : Undefined Reference in Ubuntu 20.04 LTS in WSL

Hello guys,

I'm currently running into these errors:
/micro/libs/cpprestsdk/build.release/Binaries/libcpprest.a(http_compression.cpp.o): in function web::http::compression::builtin::zlib_decompressor_base::reset()': http_compression.cpp:(.text._ZN3web4http11compression7builtin22zlib_decompressor_base5resetEv[_ZN3web4http11compression7builtin22zlib_decompressor_base5resetEv]+0x26): undefined reference to inflateReset'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_setspecific@GLIBC_2.34' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to dlopen@GLIBC_2.34'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_rwlock_init@GLIBC_2.34' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_rwlock_wrlock@GLIBC_2.34'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to dlerror@GLIBC_2.34' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_getspecific@GLIBC_2.34'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to dlclose@GLIBC_2.34' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_rwlock_rdlock@GLIBC_2.34'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_key_delete@GLIBC_2.34' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to fstat@GLIBC_2.33'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to stat@GLIBC_2.33' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_once@GLIBC_2.34'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to dladdr@GLIBC_2.34' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_rwlock_destroy@GLIBC_2.34'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_key_create@GLIBC_2.34' /usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to pthread_rwlock_unlock@GLIBC_2.34'
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/openssl@3/3.0.7/lib/libcrypto.so: undefined reference to `dlsym@GLIBC_2.34'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/micro-service.dir/build.make:156: micro-service] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/micro-service.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

The ubuntu install uses g++ version 9 so I'm not sure if that's the problem.

Build fails

./build_dependencies.sh

Scanning dependencies of target cpprest
[  3%] Building CXX object src/CMakeFiles/cpprest.dir/http/client/http_client.cpp.o
[  6%] Building CXX object src/CMakeFiles/cpprest.dir/http/client/http_client_msg.cpp.o
[ 10%] Building CXX object src/CMakeFiles/cpprest.dir/http/client/x509_cert_utilities.cpp.o
[ 13%] Building CXX object src/CMakeFiles/cpprest.dir/http/common/http_helpers.cpp.o
[ 17%] Building CXX object src/CMakeFiles/cpprest.dir/http/common/http_msg.cpp.o
[ 20%] Building CXX object src/CMakeFiles/cpprest.dir/http/listener/http_listener.cpp.o
[ 24%] Building CXX object src/CMakeFiles/cpprest.dir/http/listener/http_listener_msg.cpp.o
[ 27%] Building CXX object src/CMakeFiles/cpprest.dir/http/listener/http_server_api.cpp.o
[ 31%] Building CXX object src/CMakeFiles/cpprest.dir/http/oauth/oauth1.cpp.o
[ 34%] Building CXX object src/CMakeFiles/cpprest.dir/http/oauth/oauth2.cpp.o
[ 37%] Building CXX object src/CMakeFiles/cpprest.dir/json/json.cpp.o
[ 41%] Building CXX object src/CMakeFiles/cpprest.dir/json/json_parsing.cpp.o
[ 44%] Building CXX object src/CMakeFiles/cpprest.dir/json/json_serialization.cpp.o
[ 48%] Building CXX object src/CMakeFiles/cpprest.dir/pplx/pplx.cpp.o
[ 51%] Building CXX object src/CMakeFiles/cpprest.dir/uri/uri.cpp.o
/Users/solidity/Desktop/micro-service/libs/cpprestsdk/Release/src/uri/uri.cpp:25:73: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
    std::transform(m_scheme.begin(), m_scheme.end(), m_scheme.begin(), [this](utility::char_t c) {
                                                                        ^
/Users/solidity/Desktop/micro-service/libs/cpprestsdk/Release/src/uri/uri.cpp:30:67: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
    std::transform(m_host.begin(), m_host.end(), m_host.begin(), [this](utility::char_t c) {
                                                                  ^
2 errors generated.
make[2]: *** [src/CMakeFiles/cpprest.dir/uri/uri.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/cpprest.dir/all] Error 2
make: *** [all] Error 2

cmake: stable 3.12.1 (bottled), HEAD
boost: stable 1.67.0 (bottled), HEAD
openssl: stable 1.0.2o (bottled) [keg-only]
Mac OS 10.13.3

build error - CMAKE_CXX_COMPILER not set, after EnableLanguage

I tried the solution from https://github.com/ivanmejiarocha/micro-service/issues/2 (why not updating the README?) but that didn't help.
I tried:

export CXX=g++-4.9
./build_dependencies.sh

and also tried

export CXX=/usr/bin/g++
./build_dependencies.sh

Build Error Due to Incompatibility with OpenSSL Version

The build process is failing due to an incompatibility with the version of OpenSSL installed on the system. The project appears to require OpenSSL version 1.0.2s, but the system has OpenSSL version 3.3.1 installed. As a result, the build process is unable to locate the required OpenSSL libraries, leading to errors during compilation.

Steps to Reproduce:

Clone the project repository.
Navigate to the build directory.
Run cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. to generate the build files.
Run make -j 8 to build the project.
Expected Behavior:
The project should build successfully without any errors.

Actual Behavior:
The build process fails with errors related to missing OpenSSL libraries, specifically libssl.1.0.0.dylib.

Potential Solutions:

Update the project's build configuration to use the correct paths for OpenSSL version 3.3.1.
Install OpenSSL version 1.0.2s on the system and configure the build process to use this specific version.
Ensure compatibility with OpenSSL version 3.x or update the project to support the newer OpenSSL version.
Consult the project's documentation or community for guidance on resolving compatibility issues with OpenSSL.

'SourceRequest' not supported

After calling the GET method on url:

Could not load source './nptl/./nptl/pthread_kill.c': 'SourceRequest' not supported..

and

terminate called after throwing an instance of 'boost::wrapexcept<boost::asio::execution::bad_executor>' what(): bad executor

Any idea ?

Error while building

I followed the steps and on execution of step 6 I receive the following error:

make[1]: *** [CMakeFiles/micro-service.dir/all] Error 2
make: *** [all] Error 2

I am using mc os with M1 processor (ARM).

build errors with clang on 32bit of ubuntu 16

my build enviroment: clang3.8 on ubuntu 16.04 32bit

if [[ "$OSTYPE" == "linux-gnu" ]]; then
	export CXX=g++-4.9
fi

need to be commented in libs/build_dependencies.sh.

CMAKE_CXX_FLAGS need to change to

set(CMAKE_CXX_FLAGS "-m32 -std=c++11 -pthread -DBOOST_LOG_DYN_LINK -Wno-deprecated-declarations")

-stdlib=libc++ need libc++-dev to be installed for llvm, but still leads to error: fatal error: '__cxxabi_config.h' file not found, i've googled it, It seems like an ubuntu16 bug for clang3.8, so i just remove -stdlib=libc++.

-pthread need to be added to resove link error:
network_utils.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2

Undefined symbols for architecture x86_64

Using:
Mac OS High Sierra 10.13.6
XCode: 9.4.1

After following instructions 1-4 on the "How To Build" section in the README I get the following error when I try to run step 5.

The only changes I made were update the versions for cpprestsdk to 2.10.4 in the /build/build_dependencies.sh file and i also updated the version of OPENSSL to 1.0.2p in the cmakelists.txt file.

Undefined symbols for architecture x86_64: "_deflate", referenced from: web::http::details::compression::stream_compressor::stream_compressor_impl::compress(unsigned char const*, unsigned long, bool) in libcpprest.a(http_helpers.cpp.o) "_deflateEnd", referenced from: std::__1::__shared_ptr_emplace<web::http::details::compression::stream_compressor::stream_compressor_impl, std::__1::allocator<web::http::details::compression::stream_compressor::stream_compressor_impl> >::~__shared_ptr_emplace() in libcpprest.a(http_helpers.cpp.o) std::__1::__shared_ptr_emplace<web::http::details::compression::stream_compressor::stream_compressor_impl, std::__1::allocator<web::http::details::compression::stream_compressor::stream_compressor_impl> >::~__shared_ptr_emplace() in libcpprest.a(http_helpers.cpp.o) std::__1::__shared_ptr_emplace<web::http::details::compression::stream_compressor::stream_compressor_impl, std::__1::allocator<web::http::details::compression::stream_compressor::stream_compressor_impl> >::__on_zero_shared() in libcpprest.a(http_helpers.cpp.o) "_deflateInit2_", referenced from: std::__1::shared_ptr<web::http::details::compression::stream_compressor::stream_compressor_impl> std::__1::shared_ptr<web::http::details::compression::stream_compressor::stream_compressor_impl>::make_shared<web::http::details::compression::compression_algorithm&>(web::http::details::compression::compression_algorithm&&&) in libcpprest.a(http_helpers.cpp.o) "_deflateInit_", referenced from: std::__1::shared_ptr<web::http::details::compression::stream_compressor::stream_compressor_impl> std::__1::shared_ptr<web::http::details::compression::stream_compressor::stream_compressor_impl>::make_shared<web::http::details::compression::compression_algorithm&>(web::http::details::compression::compression_algorithm&&&) in libcpprest.a(http_helpers.cpp.o) "_inflate", referenced from: web::http::details::compression::stream_decompressor::stream_decompressor_impl::decompress(unsigned char const*, unsigned long) in libcpprest.a(http_helpers.cpp.o) "_inflateEnd", referenced from: std::__1::__shared_ptr_emplace<web::http::details::compression::stream_decompressor::stream_decompressor_impl, std::__1::allocator<web::http::details::compression::stream_decompressor::stream_decompressor_impl> >::~__shared_ptr_emplace() in libcpprest.a(http_helpers.cpp.o) std::__1::__shared_ptr_emplace<web::http::details::compression::stream_decompressor::stream_decompressor_impl, std::__1::allocator<web::http::details::compression::stream_decompressor::stream_decompressor_impl> >::~__shared_ptr_emplace() in libcpprest.a(http_helpers.cpp.o) std::__1::__shared_ptr_emplace<web::http::details::compression::stream_decompressor::stream_decompressor_impl, std::__1::allocator<web::http::details::compression::stream_decompressor::stream_decompressor_impl> >::__on_zero_shared() in libcpprest.a(http_helpers.cpp.o) "_inflateInit2_", referenced from: web::http::details::compression::stream_decompressor::stream_decompressor(web::http::details::compression::compression_algorithm) in libcpprest.a(http_helpers.cpp.o) web::http::details::compression::stream_decompressor::stream_decompressor(web::http::details::compression::compression_algorithm) in libcpprest.a(http_helpers.cpp.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [micro-service] Error 1 make[1]: *** [CMakeFiles/micro-service.dir/all] Error 2 make: *** [all] Error 2

step 7 is not clear

" 7. On ./build directory type and you should see the following output:"
type what..?

had to adjust build_dependencies.sh to get everything to work

Hey, let me start out by saying thanks for the time you spent creating this repo! It is the only example of the cpprestsdk I've found that shows how it could be used in a real project.

While I was going through the build process I did run into an issue though. On lines 19-21 of build_dependencies.sh there are these three lines:

if [[ "$OSTYPE" == "linux-gnu" ]]; then
	export CXX=g++-4.9
fi

I was running this on a Linux system, Ubuntu 16.04, and I had to comment out these lines in order to build the project. Before I commented them out I would get the following output from running build_dependencies.sh:

Cloning into './cpprestsdk'...                                                                
remote: Counting objects: 27188, done.                                                         
remote: Compressing objects: 100% (14/14), done.                                               
remote: Total 27188 (delta 7), reused 15 (delta 6), pack-reused 27168                          
Receiving objects: 100% (27188/27188), 9.28 MiB | 9.08 MiB/s, done.                            
Resolving deltas: 100% (20045/20045), done.                                                    
Checking connectivity... done.                                                                 
Checking out files: 100% (840/840), done.                                                      
Switched to a new branch 'v2.9.1'                                                              
CMake Error at /usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake:56 (message):        
  Could not find compiler set in environment variable CXX:                                        
                                                                                              
  g++-4.9.                                                                                       
                                                                                             
Call Stack (most recent call first):                                                             
  CMakeLists.txt:3 (project)                                                                       
                                                                                                 
                                                                                         
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage                                  
make: *** No targets specified and no makefile found.  Stop.     

Parsing Json

Hello Ivan,
Thank you for sharing this great work.
I'm trying to parse a simple Json request object from a Post request.

{"page":1, "pageSize":10}

None of the examples I found work properly. For example "class web::json::value’ has no member named ‘cbegin’".

I could see how you made a json object from scratch and it's very easy.
Do you have some easy (or not so easy) way to do the get the json object from a request?
Thanks in advance,
Diego

add -pthread for gcc compiler

Hi, Ivan!

Gcc doesn't support work with threads by default.
Add -pthread for turn on.

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=gnu++11 -DBOOST_LOG_DYN_LINK")

Thank you!

micro-service ( trying to build in Ubuntu 18.04 machine), but zlip path is empty in CMakeLists.txt

Hello Ivan, good morning.

I am working with steps and code given in https://github.com/ivanmejiarocha/micro-service , during mentioned workflow there is challenge coming up from non availability of functions from zlip

Machine: Ubuntu 18.04 X86 AMD
libcpprest.a is created by using ./build_dependencies.sh
cmake is done in micro-service/build$
make -j 8 the following error message coming ( done in micro-service/build )

 **undefined reference to `deflate'**

_http_compression.cpp:(.text._ZN3web4http11compression7builtin20zlib_compressor_base8compressEPKhmPhmNS1_14operation_hintERmRb[ZN3web4http11compression7builtin20zlib_compressor_base8compressEPKhmPhmNS1_14operation_hintERmRb]+0x17f): undefined reference to `deflate'
collect2: error: ld returned 1 exit status

HINT
ZIP_LIBRARY appears to be empty in after
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
@ivanmejiarocha
Could you kindly advice
Thanks a lot in advance
jk

Build Error undefined reference

Hi,
I tried several times to compile micro-service example on my server but always the same errors. cpprestsdk compile successfully, also I added include of <signal.h> in source/foundation/include/usr_interrupt_handler.hpp.
I'm also tried to set -lboost_filesystem -lcpprest -lboost_system -lboost_thread -lboost_chrono -lssl -lcrypto... but without success, I try specifying folder with -L but no change !
Please help me to resolve this problem (I'm using gcc 5.4, Boost 1.58.0, openssl libs 1.0.2g on ubuntu server Xenial LTS 64bit)

CMakeFiles/micro-service.dir/source/main.cpp.o: In function std::_Sp_counted_ptr<boost::asio::ssl::detail::openssl_init_base::do_init*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()': main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x1a): undefined reference to CRYPTO_set_id_callback'
main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x21): undefined reference to CRYPTO_set_locking_callback' main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x26): undefined reference to ERR_free_strings'
main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x2d): undefined reference to ERR_remove_thread_state' main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x32): undefined reference to EVP_cleanup'
main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x37): undefined reference to CRYPTO_cleanup_all_ex_data' main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x41): undefined reference to CONF_modules_unload'
main.cpp:(.text._ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt15_Sp_counted_ptrIPN5boost4asio3ssl6detail17openssl_init_base7do_initELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x46): undefined reference to ENGINE_cleanup' CMakeFiles/micro-service.dir/source/main.cpp.o: In function boost::asio::error::detail::ssl_category::messageabi:cxx11 const':
main.cpp:(.text._ZNK5boost4asio5error6detail12ssl_category7messageB5cxx11Ei[_ZNK5boost4asio5error6detail12ssl_category7messageB5cxx11Ei]+0x21): undefined reference to ERR_reason_error_string' CMakeFiles/micro-service.dir/source/main.cpp.o: In function boost::asio::ssl::detail::openssl_init_base::do_init::~do_init()':
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x10): undefined reference to CRYPTO_set_id_callback' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x17): undefined reference to CRYPTO_set_locking_callback'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x1c): undefined reference to ERR_free_strings' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x23): undefined reference to ERR_remove_thread_state'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x28): undefined reference to EVP_cleanup' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x2d): undefined reference to CRYPTO_cleanup_all_ex_data'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x37): undefined reference to CONF_modules_unload' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x3c): undefined reference to ENGINE_cleanup'
CMakeFiles/micro-service.dir/source/main.cpp.o: In function _GLOBAL__sub_I_main': main.cpp:(.text.startup+0x301): undefined reference to boost::system::generic_category()'
main.cpp:(.text.startup+0x306): undefined reference to boost::system::generic_category()' main.cpp:(.text.startup+0x30b): undefined reference to boost::system::system_category()'
main.cpp:(.text.startup+0x310): undefined reference to boost::system::system_category()' CMakeFiles/micro-service.dir/source/main.cpp.o: In function boost::asio::ssl::detail::openssl_init_base::instance()':
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv[_ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv]+0xbd): undefined reference to SSL_library_init' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv[_ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv]+0xc2): undefined reference to SSL_load_error_strings'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv[_ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv]+0xc7): undefined reference to OPENSSL_add_all_algorithms_noconf' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv[_ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv]+0xcc): undefined reference to CRYPTO_num_locks'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv[_ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv]+0x16b): undefined reference to boost::system::system_category()' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv[_ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv]+0x243): undefined reference to CRYPTO_set_locking_callback'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv[_ZN5boost4asio3ssl6detail17openssl_init_base8instanceEv]+0x24d): undefined reference to CRYPTO_set_id_callback' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::responseNotImpl(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)':
microsvc_controller.cpp:(.text+0x185): undefined reference to web::json::value::object(bool)' microsvc_controller.cpp:(.text+0x1b0): undefined reference to web::json::value::string(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'
microsvc_controller.cpp:(.text+0x1db): undefined reference to web::json::value::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' microsvc_controller.cpp:(.text+0x1e6): undefined reference to web::json::value::operator=(web::json::value&&)'
microsvc_controller.cpp:(.text+0x25a): undefined reference to web::json::value::string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' microsvc_controller.cpp:(.text+0x285): undefined reference to web::json::value::operator[](std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
microsvc_controller.cpp:(.text+0x292): undefined reference to web::json::value::operator=(web::json::value&&)' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::details::_ScheduleFuncWithAutoInline(std::function<void ()> const&, pplx::details::_TaskInliningMode) [clone .constprop.1086]':
microsvc_controller.cpp:(.text+0x461): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::initRestOpHandlers()':
microsvc_controller.cpp:(.text+0xab0): undefined reference to web::http::methods::GET[abi:cxx11]' microsvc_controller.cpp:(.text+0xb0b): undefined reference to web::http::methods::PUT[abi:cxx11]'
microsvc_controller.cpp:(.text+0xb66): undefined reference to web::http::methods::POST[abi:cxx11]' microsvc_controller.cpp:(.text+0xbc1): undefined reference to web::http::methods::DEL[abi:cxx11]'
microsvc_controller.cpp:(.text+0xc1c): undefined reference to web::http::methods::PATCH[abi:cxx11]' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleGet(web::http::http_request)':
microsvc_controller.cpp:(.text+0xddf): undefined reference to web::json::value::object(bool)' microsvc_controller.cpp:(.text+0xe01): undefined reference to web::json::value::string(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'
microsvc_controller.cpp:(.text+0xe1f): undefined reference to web::json::value::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' microsvc_controller.cpp:(.text+0xe2a): undefined reference to web::json::value::operator=(web::json::value&&)'
microsvc_controller.cpp:(.text+0xe91): undefined reference to web::json::value::string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' microsvc_controller.cpp:(.text+0xeb5): undefined reference to web::json::value::operator[](std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
microsvc_controller.cpp:(.text+0xec2): undefined reference to web::json::value::operator=(web::json::value&&)' microsvc_controller.cpp:(.text+0xf89): undefined reference to web::http::details::http_msg_base::http_msg_base()'
microsvc_controller.cpp:(.text+0xfac): undefined reference to vtable for web::http::details::_http_response' microsvc_controller.cpp:(.text+0xff3): undefined reference to web::http::details::_http_request::reply(web::http::http_response const&)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handlePatch(web::http::http_request)': microsvc_controller.cpp:(.text+0x1175): undefined reference to web::http::methods::PATCH[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handlePut(web::http::http_request)': microsvc_controller.cpp:(.text+0x1225): undefined reference to web::http::methods::PUT[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handlePost(web::http::http_request)': microsvc_controller.cpp:(.text+0x12d5): undefined reference to web::http::methods::POST[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleDelete(web::http::http_request)': microsvc_controller.cpp:(.text+0x1385): undefined reference to web::http::methods::DEL[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleHead(web::http::http_request)': microsvc_controller.cpp:(.text+0x1435): undefined reference to web::http::methods::HEAD[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleOptions(web::http::http_request)': microsvc_controller.cpp:(.text+0x14e5): undefined reference to web::http::methods::OPTIONS[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleTrace(web::http::http_request)': microsvc_controller.cpp:(.text+0x1595): undefined reference to web::http::methods::TRCE[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleConnect(web::http::http_request)': microsvc_controller.cpp:(.text+0x1645): undefined reference to web::http::methods::CONNECT[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleMerge(web::http::http_request)': microsvc_controller.cpp:(.text+0x16f5): undefined reference to web::http::methods::MERGE[abi:cxx11]'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::details::_CancellationTokenRegistration::_Invoke()': microsvc_controller.cpp:(.text._ZN4pplx7details30_CancellationTokenRegistration7_InvokeEv[_ZN4pplx7details30_CancellationTokenRegistration7_InvokeEv]+0x20): undefined reference to pplx::details::platform::GetCurrentThreadId()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::details::_CancellationTokenState::_Cancel()': microsvc_controller.cpp:(.text._ZN4pplx7details23_CancellationTokenState7_CancelEv[_ZN4pplx7details23_CancellationTokenState7_CancelEv]+0xdb): undefined reference to pplx::details::platform::GetCurrentThreadId()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::task_options::task_options()': microsvc_controller.cpp:(.text._ZN4pplx12task_optionsC2Ev[_ZN4pplx12task_optionsC5Ev]+0x1c): undefined reference to pplx::get_ambient_scheduler()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::details::_Task_impl_base::_DeregisterCancellation()': microsvc_controller.cpp:(.text._ZN4pplx7details15_Task_impl_base23_DeregisterCancellationEv[_ZN4pplx7details15_Task_impl_base23_DeregisterCancellationEv]+0x1c5): undefined reference to pplx::details::platform::GetCurrentThreadId()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::details::_Task_impl_base::_RegisterCancellation(std::weak_ptr<pplx::details::_Task_impl_base>)': microsvc_controller.cpp:(.text._ZN4pplx7details15_Task_impl_base21_RegisterCancellationESt8weak_ptrIS1_E[_ZN4pplx7details15_Task_impl_base21_RegisterCancellationESt8weak_ptrIS1_E]+0xc1): undefined reference to pplx::details::platform::GetCurrentThreadId()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function std::_Sp_counted_ptr_inplace<web::http::details::_http_response, std::allocator<web::http::details::_http_response>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()': microsvc_controller.cpp:(.text._ZNSt23_Sp_counted_ptr_inplaceIN3web4http7details14_http_responseESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt23_Sp_counted_ptr_inplaceIN3web4http7details14_http_responseESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x18): undefined reference to vtable for web::http::details::_http_response'
microsvc_controller.cpp:(.text._ZNSt23_Sp_counted_ptr_inplaceIN3web4http7details14_http_responseESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt23_Sp_counted_ptr_inplaceIN3web4http7details14_http_responseESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x59): undefined reference to vtable for web::http::details::http_msg_base' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function Concurrency::streams::details::streambuf_state_manager::_close_read()':
microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details23streambuf_state_managerIcE11_close_readEv[_ZN11Concurrency7streams7details23streambuf_state_managerIcE11_close_readEv]+0x20): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function Concurrency::streams::details::streambuf_state_manager::_close_write()':
microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details23streambuf_state_managerIcE12_close_writeEv[_ZN11Concurrency7streams7details23streambuf_state_managerIcE12_close_writeEv]+0x20): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function Concurrency::streams::details::basic_container_buffer<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::~basic_container_buffer()':
microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED0Ev[_ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED5Ev]+0x29): undefined reference to pplx::get_ambient_scheduler()' microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED0Ev[_ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED5Ev]+0xb2): undefined reference to pplx::get_ambient_scheduler()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::http_response::set_body(web::json::value const&)': microsvc_controller.cpp:(.text._ZN3web4http13http_response8set_bodyERKNS_4json5valueE[_ZN3web4http13http_response8set_bodyERKNS_4json5valueE]+0x30): undefined reference to web::json::value::serializeabi:cxx11 const'
microsvc_controller.cpp:(.text._ZN3web4http13http_response8set_bodyERKNS_4json5valueE[_ZN3web4http13http_response8set_bodyERKNS_4json5valueE]+0x42): undefined reference to utility::conversions::to_utf8string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' microsvc_controller.cpp:(.text._ZN3web4http13http_response8set_bodyERKNS_4json5valueE[_ZN3web4http13http_response8set_bodyERKNS_4json5valueE]+0x436): undefined reference to web::http::details::http_msg_base::set_body(Concurrency::streams::basic_istream const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::http_request::reply(unsigned short, web::json::value const&) const': microsvc_controller.cpp:(.text._ZNK3web4http12http_request5replyEtRKNS_4json5valueE[_ZNK3web4http12http_request5replyEtRKNS_4json5valueE]+0x60): undefined reference to web::http::details::http_msg_base::http_msg_base()'
microsvc_controller.cpp:(.text._ZNK3web4http12http_request5replyEtRKNS_4json5valueE[_ZNK3web4http12http_request5replyEtRKNS_4json5valueE]+0x77): undefined reference to vtable for web::http::details::_http_response' microsvc_controller.cpp:(.text._ZNK3web4http12http_request5replyEtRKNS_4json5valueE[_ZNK3web4http12http_request5replyEtRKNS_4json5valueE]+0xcc): undefined reference to web::http::details::_http_request::reply(web::http::http_response const&)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function std::_Function_handler<pplx::task<void> (), Concurrency::streams::details::streambuf_state_manager<char>::close(std::_Ios_Openmode)::{lambda()#2}>::_M_invoke(std::_Any_data const&)': microsvc_controller.cpp:(.text._ZNSt17_Function_handlerIFN4pplx4taskIvEEvEZN11Concurrency7streams7details23streambuf_state_managerIcE5closeESt13_Ios_OpenmodeEUlvE0_E9_M_invokeERKSt9_Any_data[_ZNSt17_Function_handlerIFN4pplx4taskIvEEvEZN11Concurrency7streams7details23streambuf_state_managerIcE5closeESt13_Ios_OpenmodeEUlvE0_E9_M_invokeERKSt9_Any_data]+0x2d): undefined reference to pplx::get_ambient_scheduler()'
microsvc_controller.cpp:(.text._ZNSt17_Function_handlerIFN4pplx4taskIvEEvEZN11Concurrency7streams7details23streambuf_state_managerIcE5closeESt13_Ios_OpenmodeEUlvE0_E9_M_invokeERKSt9_Any_data[_ZNSt17_Function_handlerIFN4pplx4taskIvEEvEZN11Concurrency7streams7details23streambuf_state_managerIcE5closeESt13_Ios_OpenmodeEUlvE0_E9_M_invokeERKSt9_Any_data]+0xde): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function Concurrency::streams::details::basic_container_buffer<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::_getn(char*, unsigned long)':
microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5_getnEPcm[_ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5_getnEPcm]+0x2c): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function Concurrency::streams::details::basic_container_buffer<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >::_putn(char const*, unsigned long)':
microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5_putnEPKcm[_ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5_putnEPKcm]+0x2e): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function Concurrency::streams::details::streambuf_state_manager::_putn(char const*, unsigned long, bool)':
microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details23streambuf_state_managerIcE5_putnEPKcmb[_ZN11Concurrency7streams7details23streambuf_state_managerIcE5_putnEPKcmb]+0x44): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o:microsvc_controller.cpp:(.text._ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5_syncEv[_ZN11Concurrency7streams7details22basic_container_bufferINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5_syncEv]+0x1c): more undefined references to pplx::get_ambient_scheduler()' follow
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function _GLOBAL__sub_I__ZN22MicroserviceController18initRestOpHandlersEv': microsvc_controller.cpp:(.text.startup+0x33): undefined reference to boost::system::generic_category()'
microsvc_controller.cpp:(.text.startup+0x38): undefined reference to boost::system::generic_category()' microsvc_controller.cpp:(.text.startup+0x3d): undefined reference to boost::system::system_category()'
microsvc_controller.cpp:(.text.startup+0x42): undefined reference to boost::system::system_category()' CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function cfx::NetworkUtils::queryHostInetInfo()':
network_utils.cpp:(.text+0x171): undefined reference to boost::system::system_category()' network_utils.cpp:(.text+0x19b): undefined reference to boost::system::system_category()'
network_utils.cpp:(.text+0x3c9): undefined reference to boost::system::system_category()' CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o:network_utils.cpp:(.text+0x77b): more undefined references to boost::system::system_category()' follow
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::ip::resolver_service<boost::asio::ip::tcp>::~resolver_service()': network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED0Ev[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED5Ev]+0x334): undefined reference to pthread_detach'
network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED0Ev[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED5Ev]+0x356): undefined reference to pthread_join' network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED0Ev[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED5Ev]+0x379): undefined reference to pthread_detach'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::ip::resolver_service<boost::asio::ip::tcp>::shutdown_service()': network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE16shutdown_serviceEv[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE16shutdown_serviceEv]+0x1f6): undefined reference to pthread_join'
network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE16shutdown_serviceEv[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE16shutdown_serviceEv]+0x219): undefined reference to pthread_detach' CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::ip::resolver_serviceboost::asio::ip::tcp::~resolver_service()':
network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED2Ev[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED5Ev]+0x334): undefined reference to pthread_detach' network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED2Ev[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED5Ev]+0x356): undefined reference to pthread_join'
network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED2Ev[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEED5Ev]+0x379): undefined reference to pthread_detach' CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::detail::task_io_service_thread_info::~task_io_service_thread_info()':
network_utils.cpp:(.text._ZN5boost4asio6detail27task_io_service_thread_infoD2Ev[_ZN5boost4asio6detail27task_io_service_thread_infoD5Ev]+0x43): undefined reference to boost::system::system_category()' CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::ip::resolver_serviceboost::asio::ip::tcp::fork_service(boost::asio::io_service::fork_event)':
network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE]+0x12d): undefined reference to pthread_create' network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE]+0x141): undefined reference to boost::system::system_category()'
network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE]+0x186): undefined reference to pthread_join' network_utils.cpp:(.text._ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE[_ZN5boost4asio2ip16resolver_serviceINS1_3tcpEE12fork_serviceENS0_10io_service10fork_eventE]+0x19d): undefined reference to pthread_detach'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost_asio_detail_posix_thread_function': network_utils.cpp:(.text.boost_asio_detail_posix_thread_function[boost_asio_detail_posix_thread_function]+0x49): undefined reference to boost::system::system_category()'
network_utils.cpp:(.text.boost_asio_detail_posix_thread_function[boost_asio_detail_posix_thread_function]+0x57): undefined reference to boost::system::system_category()' network_utils.cpp:(.text.boost_asio_detail_posix_thread_function[boost_asio_detail_posix_thread_function]+0x417): undefined reference to boost::system::system_category()'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::detail::posix_thread::func<boost::asio::detail::resolver_service_base::work_io_service_runner>::run()': network_utils.cpp:(.text._ZN5boost4asio6detail12posix_thread4funcINS1_21resolver_service_base22work_io_service_runnerEE3runEv[_ZN5boost4asio6detail12posix_thread4funcINS1_21resolver_service_base22work_io_service_runnerEE3runEv]+0x31): undefined reference to boost::system::system_category()'
network_utils.cpp:(.text._ZN5boost4asio6detail12posix_thread4funcINS1_21resolver_service_base22work_io_service_runnerEE3runEv[_ZN5boost4asio6detail12posix_thread4funcINS1_21resolver_service_base22work_io_service_runnerEE3runEv]+0x3f): undefined reference to boost::system::system_category()' CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o:network_utils.cpp:(.text._ZN5boost4asio6detail12posix_thread4funcINS1_21resolver_service_base22work_io_service_runnerEE3runEv[_ZN5boost4asio6detail12posix_thread4funcINS1_21resolver_service_base22work_io_service_runnerEE3runEv]+0x3a4): more undefined references to boost::system::system_category()' follow
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function _GLOBAL__sub_I__ZN3cfx12NetworkUtils17queryHostInetInfoEv': network_utils.cpp:(.text.startup+0x23): undefined reference to boost::system::generic_category()'
network_utils.cpp:(.text.startup+0x28): undefined reference to boost::system::generic_category()' network_utils.cpp:(.text.startup+0x2d): undefined reference to boost::system::system_category()'
network_utils.cpp:(.text.startup+0x32): undefined reference to boost::system::system_category()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::accept()':
basic_controller.cpp:(.text+0x1ce): undefined reference to web::http::experimental::listener::details::http_listener_impl::open()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::shutdown()':
basic_controller.cpp:(.text+0x22d): undefined reference to web::http::experimental::listener::details::http_listener_impl::close()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::requestPath[abi:cxx11](web::http::http_request const&)':
basic_controller.cpp:(.text+0x277): undefined reference to web::http::details::_http_request::relative_uri() const' basic_controller.cpp:(.text+0x28b): undefined reference to web::uri::decode(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
basic_controller.cpp:(.text+0x33a): undefined reference to web::uri::split_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function pplx::details::_ScheduleFuncWithAutoInline(std::function<void ()> const&, pplx::details::_TaskInliningMode) [clone .constprop.1048]':
basic_controller.cpp:(.text+0x401): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::setEndpoint(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)':
basic_controller.cpp:(.text+0x5ea): undefined reference to web::uri::uri(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' basic_controller.cpp:(.text+0x7eb): undefined reference to web::uri_builder::to_uri()'
basic_controller.cpp:(.text+0x8a3): undefined reference to web::http::experimental::listener::http_listener::~http_listener()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::BasicController()':
basic_controller.cpp:(.text+0xc65): undefined reference to pplx::get_ambient_scheduler()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::~BasicController()':
basic_controller.cpp:(.text+0x16c): undefined reference to web::http::experimental::listener::http_listener::~http_listener()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function std::unique_ptr<web::http::experimental::listener::details::http_listener_impl, std::default_deleteweb::http::experimental::listener::details::http_listener_impl > utility::details::make_unique<web::http::experimental::listener::details::http_listener_impl, web::uri>(web::uri&&)':
basic_controller.cpp:(.text.ZN7utility7details11make_uniqueIN3web4http12experimental8listener7details18http_listener_implENS2_3uriEEESt10unique_ptrIT_St14default_deleteISA_EEOT0[ZN7utility7details11make_uniqueIN3web4http12experimental8listener7details18http_listener_implENS2_3uriEEESt10unique_ptrIT_St14default_deleteISA_EEOT0]+0x276): undefined reference to web::http::experimental::listener::details::http_listener_impl::http_listener_impl(web::uri)' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function _GLOBAL__sub_I__ZN3cfx15BasicControllerC2Ev':
basic_controller.cpp:(.text.startup+0x33): undefined reference to boost::system::generic_category()' basic_controller.cpp:(.text.startup+0x38): undefined reference to boost::system::generic_category()'
basic_controller.cpp:(.text.startup+0x3d): undefined reference to boost::system::system_category()' basic_controller.cpp:(.text.startup+0x42): undefined reference to boost::system::system_category()'
collect2: error: ld returned 1 exit status
CMakeFiles/micro-service.dir/build.make:172: recipe for target 'micro-service' failed
make[2]: *** [micro-service] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/micro-service.dir/all' failed
make[1]: *** [CMakeFiles/micro-service.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

usr_interrupt_handler.hpp waitForUserInterrupt never comes out of wait condition

Hello,

I included usr_interrupt_handler.hpp in my project. I am calling hookSIGINT as first call in main. Then I create all endpoints (using a http_listener per endpoint), call 'open' on the endpoints ( this one: pplx::task<void> open() { return m_impl->open(); } ) and wait() on the task returned by open().

After that, i call waitForUserInterrupt();

I set some breakpoints and start debugging. When sending a sigint (ctrl c), the breakpoint on the _condition.wait(lock); line hits and when i press 'continue', it continues waiting, until sending a sigint again. The std::cout << "user has signaled to interrup program..." << '\n'; line (and thus the lock.unlock() line ) is never hit.

I thought the Ctrl C whould 'stop' the lock, so the code behind the waitForUserInterrupt() line would be executed, but that is not the case. So Ctrl C does not stop execution of my program.

How is this supposed to work? How can I make sure the lock will be 'freed' so the program can be stopped with ctrl c?

Thank you!

snprintf possible truncation

Got the following error when making:

.../micro-service/libs/cpprestsdk/Release/src/http/common/http_helpers.cpp: In function ‘size_t web::http::details::chunked_encoding::add_chunked_delimiters(uint8_t*, size_t, size_t)’:
.../micro-service/libs/cpprestsdk/Release/src/http/common/http_helpers.cpp:91:43: error: ‘%8zX’ directive output may be truncated writing between 8 and 16 bytes into a region of size 9 [-Werror=format-truncation=]
   91 |         snprintf(buffer, sizeof(buffer), "%8zX", bytes_read);
      |                                           ^~~~
.../micro-service/libs/cpprestsdk/Release/src/http/common/http_helpers.cpp:91:42: note: directive argument in the range [1, 18446744073709551615]
   91 |         snprintf(buffer, sizeof(buffer), "%8zX", bytes_read);
      |                                          ^~~~~~
.../micro-service/libs/cpprestsdk/Release/src/http/common/http_helpers.cpp:91:17: note: ‘snprintf’ output between 9 and 17 bytes into a destination of size 9
   91 |         snprintf(buffer, sizeof(buffer), "%8zX", bytes_read);
      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/cpprest.dir/build.make:121: src/CMakeFiles/cpprest.dir/http/common/http_helpers.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:113: src/CMakeFiles/cpprest.dir/all] Error 2
make: *** [Makefile:160: all] Error 2

Solved by checking the return value of snprintf in micro-service/libs/cpprestsdk/Release/src/http/common/http_helpers.cpp:89/91:

#ifdef _WIN32
    int ret = sprintf_s(buffer, sizeof(buffer), "%8IX", bytes_read);
    if (ret < 0) abort();
#else
    int ret = snprintf(buffer, sizeof(buffer), "%8zX", bytes_read);
    if (ret < 0) abort();
#endif

I suppose you could also disable warnings being treated as errors

Build error 2

I get this error when trying to build. Iv tried changing Openssl version and Cpprestsdk version in dependencies CMakeLists. Do you have a solution?

make[2]: *** No rule to make target ../libs/cpprestsdk/build.release/Binaries/libcpprest.a', needed by micro-service'. Stop. make[1]: *** [CMakeFiles/micro-service.dir/all] Error 2 make: *** [all] Error 2
skjermbilde 2019-01-31 kl 00 46 05

skjermbilde 2019-01-31 kl 00 47 06

Build failure

While building, I faced two problems.

First, the linking of the openssl library failed.

I could solve this by changing the required version in the ´CMakeList.txt´ (line 18) from ´1.0.2p´ to ´1.0.2s´.

The second problem concerns boost. It is also referenced in microsoft/cpprestsdk#1054 and
zaphoyd/websocketpp#794

for the case at hand it can be circumvented by installing boost 1.60
´brew uninstall boost´
´brew install [email protected]´

additionally the boost path needs to be set:
´export BOOST_ROOT="/usr/local/opt/[email protected]

In order for CMake to find it.

Possible incompatibility with boost 1.66.0 ("solved")

I'm writing this in the rare case that anyone else runs into the same issue that I faced using macOS High Sierra.

I really appreciate this project since it makes getting into C++ REST API building really simple. However, I ran into an issue when trying to compile the code on macOS 10.13.3. It kept complaining about no rule to include the openssl libs. After a lot of searching and tinkering I realised the problem had nothing to do with openssl, the CMake command was throwing warnings that I (ignorantly) ignored. After some messing with brew and the boost version everything compiled without a hitch.

It seems like (based on my very limited knowledge) that boost 1.66.0 lacks some of the dependencies required.

This is what I did to fix the issue:

... and that's it. After that everything compiled as it should.

Could NOT find OpenSSL

I tried export OPENSSL_ROOT_DIR=/usr/bin/
and also export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
but when I run the build_dependencies.sh file, I get:

Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR: Found unsuitable version "", but required
  is at least "1.0.0" (found OPENSSL_CRYPTO_LIBRARY-NOTFOUND)

web::json::value::string and endpointURI Errors

hello
when i want to build this project in window 10 with vs2019 i got this error I search alot but cant fix them

Severity Code Description Project File Line Suppression State Error C2248 'web::json::value::string': cannot access private member declared in class 'web::json::value' PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\microsvc_controller.cpp 46

and this is project code

void MicroserviceController::handleGet(http_request message) {
auto path = requestPath(message);
if (!path.empty()) {
    if (path[0] == "service" && path[1] == "test") {
        auto response = json::value::object();
        response["version"] = json::value::string("0.1.1");
        response["status"] = json::value::string("ready!");
        message.reply(status_codes::OK, response);
    }
}
else {
    message.reply(status_codes::NotFound);
}
}

and else this is endpointURI error

here is project code

 void BasicController::setEndpoint(const std::string & value) {
   uri endpointURI(value);
   uri_builder endpointBuilder;

   endpointBuilder.set_scheme(endpointURI.scheme());
   if (endpointURI.host() == "host_auto_ip4") {
       endpointBuilder.set_host(NetworkUtils::hostIP4());        
   }
   else if (endpointURI.host() == "host_auto_ip6") {
       endpointBuilder.set_host(NetworkUtils::hostIP6());
   }
   endpointBuilder.set_port(endpointURI.port());
   endpointBuilder.set_path(endpointURI.path());

   _listener = http_listener(endpointBuilder.to_uri());
}

and i got this error

Severity Code Description Project File Line Suppression State Error C2678 binary '==': no operator found which takes a left-hand operand of type 'const utility::string_t' (or there is no acceptable conversion) PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\foundation\basic_controller.cpp 43

Error C2664 'web::uri::uri(const web::uri &)': cannot convert argument 1 from 'const std::string' to 'const utility::char_t *' PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\foundation\basic_controller.cpp 39

Error C2664 'web::uri_builder &web::uri_builder::set_host(const utility::string_t &,bool)': cannot convert argument 1 from 'std::string' to 'const utility::string_t &' PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\foundation\basic_controller.cpp 44

your help will makes me happy thanks alot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.