You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/11/13 12:32:41 UTC

[GitHub] vongosling commented on a change in pull request #6: modify display of windows install path at README.md

vongosling commented on a change in pull request #6: modify display of windows install path at README.md
URL: https://github.com/apache/rocketmq-client-cpp/pull/6#discussion_r233018139
 
 

 ##########
 File path: README.md
 ##########
 @@ -71,30 +71,73 @@ make install
 ```
 
 ### Windows platform ###
+**note**: *make sure the following compile tools or libraries has been installed before install dependency libraries*
+
+- compile tools:  **CMake**、**Visusal Studio 2013**
+
+- libraries:   **zlib**
 #### Dependency Installation
-1. install [libevent 2.0.22](https://github.com/libevent/libevent/archive/release-2.0.22-stable.zip "libevent 2.0.22")
-extract libevent to C:/libevent
-open Virtual Studio command line tools, go to dir: C:/libevent
-execute cmd: nmake /f Makefile.nmake
-cp libevent.lib, libevent_extras.lib and libevent_core.lib to C:/libevent/lib
-
-1. install [jsoncpp 0.10.6](https://github.com/open-source-parsers/jsoncpp/archive/0.10.6.zip "jsoncpp 0.10.6")
-extract jsoncpp to C:/jsoncpp
-download [cmake windows tool](https://cmake.org/files/v3.9/cmake-3.9.3-win64-x64.zip "cmake windows tool") and extract
-run cmake-gui.exe, choose your source code dir and build dir, then click generate which will let you choose Virtual Studio version
-open project by VirtualStudio, and build jsoncpp, and jsoncpp.lib will be got
-
-1. install [boost 1.56.0](http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz "boost 1.56.0")
-according to following discription: http://www.boost.org/doc/libs/1_56_0/more/getting_started/windows.html
-following build options are needed to be set when run bjam.exe: msvc architecture=x86 address-model=64 link=static runtime-link=static stage
-all lib will be generated except boost_zlib:
-download [zlib source](http://gnuwin32.sourceforge.net/downlinks/zlib-src-zip.php "zlib source") and extract to directory C:/zlib
-run cmd:bjam.exe msvc architecture=x86 address-model=64 link=static runtime-link=static --with-iostreams -s ZLIB_SOURCE=C:\zlib\src\zlib\1.2.3\zlib-1.2.3 stage
+##### 1. install [libevent 2.0.22](https://github.com/libevent/libevent/archive/release-2.0.22-stable.zip "libevent 2.0.22")
+Extract libevent to LocalPath
+copy files in [libevent-2.0.22-stable\WIN32-Code\] to [libevent-2.0.22-stable\include\]
+Open Visual Studio command line tools(x64)
+```shell
+cd libevent-2.0.22-stable
+nmake /f Makefile.nmake
+dir *.lib
+mkdir lib
+copy libevent.lib lib\
+copy libevent_core.lib lib\
+copy libevent_extras.lib lib\
+```
+##### 2. install [jsoncpp 0.10.6](https://github.com/open-source-parsers/jsoncpp/archive/0.10.6.zip "jsoncpp 0.10.6")
+Extract jsoncpp to LocalPath
+```shell
+1.Open Visual Studio with [jsoncpp-0.10.6\makefiles\msvc2010\jsoncpp.sln]
+  Then perheps there is a message box popup, click OK.
+2.Set [Configuration]:Release at Toolbar
+  Set [Platform]:x64 at Toolbar
+3.Right click project [lib_json], and click [build], 
+  and then Visual Studio will compile the lib file at [x64/Release]
+4.copy [jsoncpp-0.10.6\makefiles\msvc2010\x64\Release\lib_json.lib]
+  to [jsoncpp-0.10.6\lib\lib_json.lib]
+```
+##### 3. install [boost 1.56.0](http://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.zip "boost 1.56.0") and [zlib 1.2.3](http://gnuwin32.sourceforge.net/downlinks/zlib-src-zip.php "zlib 1.2.3")
+Extract [boost 1.56.0] and [zlib] to LocalPath
+modify "#if 1" to "#if HAVE_UNISTD_H" at [zlib-1.2.3-src\src\zlib\1.2.3\zlib-1.2.3\zconf.h]
+Open Visual Studio command line tools(x64)
+```shell
+cd boost_1_56_0
+booststrap.bat
+bjam.exe --toolset=msvc-12.0 architecture=x86 address-model=64 link=static runtime-link=static stage --stagedir="[Your Loacl Path]\boost_1_56_0\lib" threading=multi variant=release --build-type=complete --with-iostreams -s ZLIB_SOURCE=[Your Loacl Path]\zlib-1.2.3-src\src\zlib\1.2.3\zlib-1.2.3
+```
+[Your Loacl Path] is the directory that you extract the zip file. 
 
 #### Make and Install
-run cmake-gui.exe, choose your source code dir and build dir, then click generate which will let you choose VirtualStudio version
-if generate project solution fails, change BOOST_INCLUDEDIR/LIBEVENT_INCLUDE_DIR/JSONCPP_INCLUDE_DIR in CMakeList.txt, according to its real install path
-open&build&run project by VirtualStudio
+##### 1.get source
+```shell
+git clone https://github.com/apache/rocketmq-client-cpp.git
+```
+##### 2. configure path
+open the CMakeLists.txt at [rocketmq-client-cpp] and modify the config.
+```shell
+set(BOOST_INCLUDEDIR           [Your Local Path]/boost_1_56_0/)
+
+set(LIBEVENT_INCLUDE_DIR       [Your Local Path]/libevent-2.0.22-stable/include/)
+set(LIBEVENT_CORE_LIBRARY      [Your Local Path]/libevent-2.0.22-stable/lib/libevent_core.lib)
+set(LIBEVENT_EXTRAS_LIBRARY    [Your Local Path]/libevent-2.0.22-stable/lib/libevent_extras.lib)
+set(LIBEVENT_LIBEVENT_LIBRARY  [Your Local Path]/libevent-2.0.22-stable/lib/libevent.lib)
+
+set(JSONCPP_INCLUDE_DIRS       [Your Local Path]/jsoncpp-0.10.6/include/)
+set(JSONCPP_LIBRARIES          [Your Local Path]/jsoncpp-0.10.6/lib/lib_json.lib)
+```
+##### 3. download [CMake Tool](https://cmake.org/files/v3.13/cmake-3.13.0-rc3-win64-x64.zip "cmake-3.13.0-rc3")
+Extract cmake to LocalPath.
+Run cmake-gui.exe, choose your source code dir and build dir, then click generate which will let you choose [Virtual Studio 12 2013 Win64] version.
 
 Review comment:
   Are there any compatible comments on the higher VS version?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services