Rocketmq CPP client visual studio 2019 compilation

Light wind 2021-01-14 14:19:52
rocketmq cpp client visual studio


rocketmq-cpp-client Visual Studio 2019 compile

rocketmq-cpp-client yes rocketmq c++ Version of So we C++ Developers use this project

structure

  • Get the project
// Cloning project
git clone https://github.com/apache/rocketmq-client-cpp.git

After cloning the project You'll see the following project structure

image-20210114100103931
Let's open the... In the project win32_build.bat Open in Notepad

image-20210114100305894
These three are the dependent third-party libraries We can Copy These three addresses are used manually by themselves git Cloned

  • Ready to build dependent third party libraries
    Create a new folder under the root of the project to store the source code of the third-party library
    image-20210114100627207
    Get into thirdparty Folder Ready to clone Third party libraries needed
    git clone https://github.com/jsj020122/jsoncpp-0.10.6.git
    git clone https://github.com/jsj020122/boost_1_58_0.git
    git clone https://github.com/jsj020122/libevent-release-2.0.22.git
    git clone https://github.com/jsj020122/zlib-1.2.3-src.git
    
    boost The library is bigger So it will take a long time Just wait patiently for a while
    • download Openssl library install
      You need to use
    https://slproweb.com/products/Win32OpenSSL.html
    
    • install vs2015 Compile environment

image-20210114103232284
image-20210114103320857

  • compile boost library

image-20210114103532336
Use vs2019 x86 tools Command line tools Get into boost_1_58_0 Catalog
Start compilation Build and compile tools

bootstrap.bat

image-20210114104418489

Start compilation boost library

debug Compile command

bjam.exe address-model=32 --with-serialization --with-atomic --with-log --with-locale --with-iostreams --with-system --with-regex --with-thread --with-date_time --with-chrono --with-filesystem link=static threading=multi variant=debug runtime-link=static

release Compile command

bjam.exe address-model=32 --with-serialization --with-atomic --with-log --with-locale --with-iostreams --with-system --with-regex --with-thread --with-date_time --with-chrono --with-filesystem link=static threading=multi variant=release runtime-link=static

Compile the complete
image-20210114105200752

  • jsoncpp-0.10.6 structure
    Use vs2019 open jsoncpp_lib_static.vcxproj

    image-20210114105451955

    Point determination Upgrade to v142

    image-20210114105556817

    Modify the runtime Multithreaded debugging (/MTd)

  • libevent-release-2.0.22 structure

    Use vs2019 open libevent.vcxproj

    image-20210114105732635
    Point determination Upgrade to v142
    image-20210114105813679
    Modify the runtime Multithreaded debugging (/MTd)

  • compile rocketmq-client-cpp
    Get into In the root directory of the project Win32 Under the table of contents Use vs2019 open rocketmq-client-cpp.sln
    Just like the Library above Upgrade to v142 Modify the runtime Multithreaded debugging (/MTd)

    Compile the generated Select the static library lib The default is dynamic library

    image-20210114110521070
    Add... To the preprocessing WIN32_LEAN_AND_MEAN Post compilation
    Find out A pile of mistakes Don't panic, let's solve it step by step

    image-20210114111905201
    First, we can't find openssl The problem with the header file Contains previously installed openssl The header file path of
    as well as Library file path

    image-20210114112120999

    image-20210114112256059
    Unable to open source file : “..\src\common\MQClient.cpp”: No such file or directory
    Exclude this file from the project source code To add ..\src\common\DefaultMQClient.cpp To project
    Add additional header file

    image-20210114112939740
    Recompile... Again

    image-20210114120102836
    Continue to report mistakes According to the view error, the reason is that boost::weak_ptr The solution is to introduce

    #include <boost/smart_ptr/weak_ptr.hpp>
    

    Compile again Then continue to report errors

    image-20210114121057971
    The reason for this is void* Can't convert bit const char* modify (const char*)

    image-20210114121218100

    After compiling again Finally, it's right

    image-20210114121340412

版权声明
本文为[Light wind]所创,转载请带上原文链接,感谢
https://javamana.com/2021/01/20210114122409953g.html

  1. Spring boot static resource configuration principle (step by step source analysis, detailed and easy to understand)
  2. 400万Docker镜像中,51%的镜像存在高危漏洞
  3. Head first design pattern -- 10. Iterator pattern
  4. A few pictures, take down the HTTPS
  5. Simple use of pyecharts module
  6. [azure redis cache] discussion on the functionality of azure redis
  7. Installation of SVN under Linux
  8. Sorting out knowledge points of MySQL Cluster
  9. rocketmq-cpp-client Visual Studio 2019 编译
  10. rocketmq-cpp-client Visual Studio 2019 编译
  11. RBAC authorization mode of k8s
  12. Remember to use it once Asp.Net The development process of core webapi 5.0 + dapper + MySQL + redis + docker
  13. Java Concurrent Programming points
  14. Explain Java I / O flow in detail
  15. Linux system builds springboot project environment and deploys it
  16. Easy to understand JS object-oriented, by the way understand prototype and__ proto__
  17. Summary of java basic knowledge
  18. . net cloud native architect training camp (module 2 basic consolidation rabbitmq mastransit detailed explanation) - learning notes
  19. The architecture of MySQL
  20. MySQL security management, database maintenance and performance improvement
  21. Redis basic command
  22. Summary of MySQL articles
  23. 2、 Create k8s cluster in 5 seconds
  24. data自定义属性在jQuery中的用法
  25. Linux常见解压缩
  26. Detailed explanation of HBase basic principle
  27. 1、 Why and how to learn k8s
  28. Java advanced (29) -- HashMap set
  29. java中大文件上传
  30. Weblogic 2017-3248 analysis of Java Security
  31. Kubernetes official java client 8: fluent style
  32. Explain the function of thread pool and how to use it in Java
  33. Programming software tutorial video Encyclopedia: C + + / Java / Python / assembly / easy language (with tutorial)
  34. Description of dependency problem after javacv is updated to 1.5. X and how to reduce the size of dependency package
  35. Java reflection & dynamic agent
  36. Building Apache 2.4 + php7 + mysql8 in centos7 environment
  37. Summary of Java multithreading (1)
  38. Oracle AWR report generation
  39. Four magic functions of mybatis, don't step on the pit!
  40. A 16-year-old high school student successfully transplanted Linux to iPhone and posted a detailed guide
  41. Centos7 one click installation of JDK1.8 shell script
  42. Mounting of file system in Linux (centos7)
  43. How does serverless deal with the resource supply demand of k8s in the offline scenario
  44. Detailed explanation of HBase basic principle
  45. Spring security oauth2.0 authentication and authorization 4: distributed system authentication and authorization
  46. Redis performance Part 5 redis buffer
  47. JavaScript this keyword
  48. Summary of Java multithreading (3)
  49. Sentry(v20.12.1) K8S 云原生架构探索, SENTRY FOR JAVASCRIPT 手动捕获事件基本用法
  50. Sentry(v20.12.1) K8S 云原生架构探索, SENTRY FOR JAVASCRIPT 手动捕获事件基本用法
  51. (10) Spring from the beginning to the end
  52. Summary of Java multithreading (2)
  53. Spring source notes! From the introduction to the source code, let you really understand the source code
  54. A stormy sunny day
  55. Zookeeper (curator), the implementation of distributed lock
  56. Show the sky! Tencent T4's core Java Dictionary (framework + principle + Notes + map)
  57. Spring boot project, how to gracefully replace the blank value in the interface parameter with null value?
  58. Spring boot project, how to gracefully replace the blank value in the interface parameter with null value?
  59. docker+mysql集群+读写分离+mycat管理+垂直分库+负载均衡
  60. docker+mysql集群+读写分离+mycat管理+垂直分库+负载均衡