Giter Site home page Giter Site logo

Comments (3)

shekharhimanshu avatar shekharhimanshu commented on July 25, 2024

Hi @serg06

I am sorry for not updating the Wiki after 2.x.x release.

For building EasyHttp 2.x.x on Windows, here are the steps (will update Wiki once this issue is fixed):

  1. Install Poco:

When installing Poco, please make sure to use the following settings (especially note this part -DENABLE_NET=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_CRYPTO=OFF)

Please change %PATH_TO_INSTALL_FOLDER%

C:\> cmake -G "Visual Studio %CMAKE_VS_VERSION%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DPOCO_VERBOSE_MESSAGES=OFF -DPOCO_STATIC=ON -DPOCO_UNBUNDLED=OFF -DENABLE_XML=ON -DENABLE_JSON=ON -DENABLE_UTIL=ON -DENABLE_NET=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_CRYPTO=OFF -DENABLE_DATA=ON -DENABLE_DATA_SQLITE=ON -DENABLE_ZIP=OFF -DENABLE_DATA_MYSQL=OFF -DENABLE_DATA_ODBC=OFF -DENABLE_MONGODB=OFF -DENABLE_PDF=OFF -DENABLE_SEVENZIP=OFF -DENABLE_PAGECOMPILER=OFF -DENABLE_PAGECOMPILER_FILE2PAGE=OFF -DENABLE_TESTS=OFF -DCMAKE_INSTALL_PREFIX="%PATH_TO_INSTALL_FOLDER%" ../
C:\> "C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe" Poco.sln
C:\> "C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe" INSTALL.vcxproj
  1. Use installed Poco when building EasyHttp:
    Please change %PATH_TO_INSTALL_FOLDER%
C:\> cmake -G "Visual Studio %CMAKE_VS_VERSION%" -DCMAKE_BUILD_TYPE=Release -DEASYHTTPCPP_VERBOSE_MESSAGES=ON -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_PREFIX_PATH="%PATH_TO_INSTALL_FOLDER%" -DENABLE_TESTS=ON -DCMAKE_INSTALL_PREFIX="%PATH_TO_INSTALL_FOLDER%" ../
C:\> "C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe" easyhttpcpp.sln
C:\> "C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe" INSTALL.vcxproj

Let me know if this works.

from easyhttpcpp.

serg06 avatar serg06 commented on July 25, 2024

Hi @shekharhimanshu, thanks for the reply.

I tried building Poco 1.7.9 and EasyHttpCpp 2.1.0 with those commands. All the Poco steps worked perfectly, but the EasyHttpCpp cmake step failed.

Here's the command, with %PATH_TO_INSTALL_FOLDER% replaced with the same value as I used in the Poco cmake command:

cmake -DCMAKE_BUILD_TYPE=Release -DEASYHTTPCPP_VERBOSE_MESSAGES=ON -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_PREFIX_PATH="C:/lib/easyhttpcpp" -DENABLE_TESTS=ON -DCMAKE_INSTALL_PREFIX="C:/lib/easyhttpcpp" ../

And the error:

-- Building static easyhttpcpp libraries
CMake Error at tests/CMakeLists.txt:7 (find_package):
  Could not find a package configuration file provided by "GMock" with any of
  the following names:

    GMockConfig.cmake
    gmock-config.cmake

  Add the installation prefix of "GMock" to CMAKE_PREFIX_PATH or set
  "GMock_DIR" to a directory containing one of the above files.  If "GMock"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

from easyhttpcpp.

shekharhimanshu avatar shekharhimanshu commented on July 25, 2024

My bad. Sorry about that.

We need googletest for testing purposes.
In step 2, kindly turn off tests, -DENABLE_TESTS=ON -> -DENABLE_TESTS=OFF.

  1. Use installed Poco when building EasyHttp:
    Please change %PATH_TO_INSTALL_FOLDER%
C:\> cmake -G "Visual Studio %CMAKE_VS_VERSION%" -DCMAKE_BUILD_TYPE=Release -DEASYHTTPCPP_VERBOSE_MESSAGES=ON -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_PREFIX_PATH="%PATH_TO_INSTALL_FOLDER%" -DENABLE_TESTS=OFF -DCMAKE_INSTALL_PREFIX="%PATH_TO_INSTALL_FOLDER%" ../
C:\> "C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe" easyhttpcpp.sln
C:\> "C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe" INSTALL.vcxproj

If you wish to build EasyHttp tests as well, please install GoogleTest as well.
Let me know if this works.

from easyhttpcpp.

Related Issues (19)

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.