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



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



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



    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



  • compile boost library



Use vs2019 x86 tools Command line tools Get into boost_1_58_0 Catalog

Start compilation Build and compile tools

bootstrap.bat

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

  • jsoncpp-0.10.6 structure

    Use vs2019 open jsoncpp_lib_static.vcxproj

    Point determination Upgrade to v142

    Modify the runtime Multithreaded debugging (/MTd)

  • libevent-release-2.0.22 structure

    Use vs2019 open libevent.vcxproj



    Point determination Upgrade to v142



    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



    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



    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



    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



    Recompile... Again



    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



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

    After compiling again Finally, it's right

rocketmq-cpp-client Visual Studio 2019 More related articles compiled

  1. Visual Studio 2019 compile .Net Core Console The project appears 【MSB4018 The &quot;CreateAppHost&quot; task failed unexpectedly】 error

    You need to test a little thing , Use Visual Studio 2019 I've created a new one .Net Core Of Console Program , But I always report errors when compiling , Dead or alive compilation failed . error message : Severity Code Des ...

  2. DX12 Long Shu 00 - Environment configuration : adopt Visual Studio 2019 Run the sample project

    0x00 install Visual Studio 2019 install Visual Studio 2019 And related components . notes : When installing the components Windows 10 SDK Can be in Individual com ...

  3. About Visual Studio 2013 compile multi-byte character set MFC The program appears MSB8031 The wrong solution

    from :http://blog.csdn.net/xiaochunzao/article/details/16987703 Visual Studio 2013 Compile the old  multi-byte char ...

  4. Visual Studio 2019 preview Experience C# 8.0 New syntax

    preparation : Visual Studio 2019 Preview Not all of them are included in the version C# 8.0 New functions , But there are also some that can be tried at present . Before we start , Two settings need to be made : take Framework Set to .ne ...

  5. Visual Studio 2019 for Mac Offline update method

    When you open Visual Studio 2019 for Mac When checking for updates , If it's slow to download updates , You can try the following : open Finder( Visit da da ), find ~/Library/Caches/VisualStudio ...

  6. If not ReSharper, that Visual Studio 2019 Can restore ReSharper How many functions ?

    original text :https://blog.csdn.net/WPwalter/article/details/100158000 This paper is divided into three parts : Visual Studio It's completely reducible ReShar ...

  7. Use visual studio 2019 Community version open touchgfx Engineering considerations

    @2019-09-23 [ Environmental Science ] touchgfx designer 4.10.0 visual studio 2019 Community Edition [ problem ] #error 1 Use visual studio 2019 ...

  8. 【 translate 】Visual Studio 2019 Of Local Process with Kubernetes

    today , We are proud to announce Local Process with Kubernetes The preview version of has been added to Visual Studio 2019 16.7 Preview 2 in .  Local Proces ...

  9. Visual Studio 2010 Always prompt at compile time &quot; An exception occurred to the calling target &quot; The solution of the

    The phenomenon : No matter what the establishment is Win32 Console Solutions for , still MFC Solutions for , Reopen Visual Studio 2010 after , Always prompt at compile time “ An exception has occurred to the target of the call ” solve : 1. close Visual ...

  10. Windows Next use Visual Studio 2010 compile ffmpeg Whole process

    stay visual studio 2010 Call in ffmpeg http://blog.sina.com.cn/s/blog_4178f4bf01018wqh.html Windows Next use Visual S ...

Random recommendation

  1. 【python The way 1】python Installation and environment variable configuration

    Search directly Python, Enter official website , Find the download , Download the software according to the PC operating system . What I made up is windows os . download python-2.7.9.msi Installation package   Double click setup , Go to the installation steps . During installation ...

  2. Let your Mac Support NTFS

    Some time ago, it was Mac After the computer , I found it a little uncomfortable , Can't be in Mac Write down NTFS Format disk , So I went to study . There are three solutions . The first one is , Direct use of third party software , Such as Paragon NTFS for MAC,T ...

  3. UML State diagrams and activity diagrams

    UML State diagrams and activity diagrams Unified modeling language UML(Unified Modeling Language) It's the third generation of generic modeling and specification languages .UML It's an open way , Pertaining to . visualization . Build and write a developing . Face right ...

  4. How to make your Apache Support include File parsing and support shtml Related configuration of

    source address :http://www.itokit.com/2011/0430/65992.html Apache Support include File parsing shtml First of all, it should be revised Apache The configuration file httpd.conf . ...

  5. [ turn ]Oracle EBS APIs

    FROM:http://blog.csdn.net/pan_tian/article/details/7754598 API To Find Sales Order's Subtotal,discou ...

  6. win10 Activate ( free + permanent ) Video tutorial

    U Disk reassembly Win10 System video tutorial Long time no see , I wonder if the students miss me ~ Recently, I haven't written for a long time because I'm too busy with my work , A lot of friends want me to push it win10 Activate tutorial , So today, after taking sanpang for Injection , Start writing an issue win10 Activate tutorial : ...

  7. JS Reference type

    a,b Are all reference types , They actually point to the same memory space , Share your destiny with your breath

  8. adopt javascript Add a row

    <html><head> <title> Add a new line </title></head><body> <div onclick=& ...

  9. Reprint ---LIBRARY_PATH and LD_LIBRARY_PATH The difference between environmental variables

    It's always unclear LIBRARY_PATH and LD_LIBRARY_PATH The difference between environmental variables , Every time I check it now , Reprinted here , Memo ... Reprinted from :https://www.cnblogs.com/panfeng4 ...

  10. IRC Chat guide

    Reference resources https://www.cnblogs.com/fzzl/archive/2011/12/26/2302637.html