Giter VIP home page Giter VIP logo

micro-service's Introduction

micro-service

This is a sample that shows how to implement a micro-serivce on C++ using the C++ REST SDK

Twitter

How to build

  1. Install git, CMake, boost, openssl on your system, if you are using macOS this can be acomplished easily with the following command:

       $ brew install cmake git openssl boost zlib
    
  2. Clone the repository.

  3. Execute the below command:

       $ export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
    
  4. Go to the directory micro-service/libs and execute the script: ./build_dependencies.sh that'll clone the C++ REST SDK repository and will build the static version of the library, if you want to build the dynamic link version of the library just on the build_dependencies.sh script remove the flag: -DBUILD_SHARED_LIBS=OFF.

  5. Go to the directory micro-service and type the following commands:

       $ mkdir build
       $ cd build
       $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
    
  6. Finally type the command:

       $ make -j 8
    
  7. On ./build directory type and you should see the following output:

       $ ./micro-service   
       $ Modern C++ Microservice now listening for requests at: http://<your computer's IP>:6502/v1/ivmero/api
    
  8. To perform a benchmark on the Modern C++ Microservice I had included two lua scritps which can be executed using WRK2 HTTP Benckmark Tool, using the following command:

       $ ./wrk -c100 -t8 -d60s -s benchmark_microsvc.lua http://192.168.100.6:6502 --latency --rate 2000
    

    and see results similar to these:

         Running 1m test @ http://192.168.100.16:6502
           8 threads and 100 connections
           Thread calibration: mean lat.: 1.524ms, rate sampling interval: 10ms
           Thread calibration: mean lat.: 1.536ms, rate sampling interval: 10ms
           Thread calibration: mean lat.: 1.485ms, rate sampling interval: 10ms
           Thread calibration: mean lat.: 1.505ms, rate sampling interval: 10ms
           Thread calibration: mean lat.: 1.490ms, rate sampling interval: 10ms
           Thread calibration: mean lat.: 1.496ms, rate sampling interval: 10ms
           Thread calibration: mean lat.: 1.486ms, rate sampling interval: 10ms
           Thread calibration: mean lat.: 1.508ms, rate sampling interval: 10ms
           Thread Stats   Avg      Stdev     Max   +/- Stdev
             Latency     1.51ms    0.85ms  25.66ms   86.53%
             Req/Sec   263.60     98.75     1.00k    78.74%
           Latency Distribution (HdrHistogram - Recorded Latency)
          50.000%    1.45ms
          75.000%    1.85ms
          90.000%    2.23ms
          99.000%    3.07ms
          99.900%   14.38ms
          99.990%   23.30ms
          99.999%   25.50ms
         100.000%   25.68ms
    
           Detailed Percentile spectrum:
                Value   Percentile   TotalCount 1/(1-Percentile)
    
                0.197     0.000000            1         1.00
                0.758     0.100000        10021         1.11
                0.975     0.200000        20018         1.25
                1.153     0.300000        30007         1.43
                1.309     0.400000        40011         1.67
                1.453     0.500000        49964         2.00
                1.526     0.550000        54957         2.22
                1.601     0.600000        59976         2.50
                1.677     0.650000        64919         2.86
                1.760     0.700000        69927         3.33
                1.850     0.750000        74946         4.00
                1.898     0.775000        77400         4.44
                1.950     0.800000        79900         5.00
                2.007     0.825000        82423         5.71
                2.071     0.850000        84903         6.67
                2.147     0.875000        87415         8.00
                2.191     0.887500        88683         8.89
                2.235     0.900000        89922        10.00
                2.285     0.912500        91143        11.43
                2.341     0.925000        92421        13.33
                2.405     0.937500        93643        16.00
                2.443     0.943750        94257        17.78
                2.485     0.950000        94884        20.00
                2.533     0.956250        95498        22.86
                2.591     0.962500        96139        26.67
                2.661     0.968750        96766        32.00
                2.699     0.971875        97060        35.56
                2.743     0.975000        97384        40.00
                2.787     0.978125        97689        45.71
                2.841     0.981250        97995        53.33
                2.909     0.984375        98310        64.00
                2.941     0.985938        98466        71.11
                2.977     0.987500        98619        80.00
                3.027     0.989062        98776        91.43
                3.091     0.990625        98931       106.67
                3.165     0.992188        99090       128.00
                3.207     0.992969        99166       142.22
                3.263     0.993750        99245       160.00
                3.317     0.994531        99321       182.86
                3.405     0.995313        99399       213.33
                3.485     0.996094        99477       256.00
                3.537     0.996484        99519       284.44
                3.623     0.996875        99557       320.00
                3.767     0.997266        99594       365.71
                4.111     0.997656        99633       426.67
                6.319     0.998047        99672       512.00
                8.943     0.998242        99692       568.89
               10.247     0.998437        99711       640.00
               11.415     0.998633        99731       731.43
               12.871     0.998828        99750       853.33
               14.503     0.999023        99770      1024.00
               15.215     0.999121        99780      1137.78
               15.759     0.999219        99789      1280.00
               16.215     0.999316        99799      1462.86
               16.911     0.999414        99809      1706.67
               18.751     0.999512        99819      2048.00
               19.279     0.999561        99825      2275.56
               19.743     0.999609        99828      2560.00
               20.383     0.999658        99834      2925.71
               21.263     0.999707        99838      3413.33
               21.375     0.999756        99843      4096.00
               21.615     0.999780        99846      4551.11
               21.647     0.999805        99848      5120.00
               21.839     0.999829        99850      5851.43
               22.303     0.999854        99853      6826.67
               22.799     0.999878        99855      8192.00
               23.295     0.999890        99857      9102.22
               23.567     0.999902        99858     10240.00
               23.631     0.999915        99859     11702.86
               23.823     0.999927        99860     13653.33
               24.415     0.999939        99861     16384.00
               24.895     0.999945        99862     18204.44
               25.135     0.999951        99863     20480.00
               25.135     0.999957        99863     23405.71
               25.183     0.999963        99864     27306.67
               25.183     0.999969        99864     32768.00
               25.391     0.999973        99865     36408.89
               25.391     0.999976        99865     40960.00
               25.391     0.999979        99865     46811.43
               25.503     0.999982        99866     54613.33
               25.503     0.999985        99866     65536.00
               25.503     0.999986        99866     72817.78
               25.503     0.999988        99866     81920.00
               25.503     0.999989        99866     93622.86
               25.679     0.999991        99867    109226.67
               25.679     1.000000        99867          inf
         #[Mean    =        1.510, StdDeviation   =        0.851]
         #[Max     =       25.664, Total count    =        99867]
         #[Buckets =           27, SubBuckets     =         2048]
         ----------------------------------------------------------
           119986 requests in 1.00m, 12.36MB read
         Requests/sec:   1999.74
         Transfer/sec:    210.91KB
    

IMPORTANT The results above will depend on the system where the test is executed and please to avoid execisve I/O during the test comment the following line on any of the scripts:

        response = function(status, headers, body)
           -- comment the following line to avoid server's excesive I/O to console on heavy load
           -- io.write("response: \n" .. body .. "\n---------------------------------------------\n")
        end

You can copy from the results above the histogram's section following the sample format found here, save it into a file and see a nice graph unsing HdrHistogram Ploter.

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

'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 ?

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.

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.     

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)

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 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

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!

step 7 is not clear

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

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

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

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.

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.

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 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

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 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

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

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!

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

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 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

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.

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

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.