From 2c73aac1fe62495d8c863a92a34d191cf8e87fc0 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期一, 07 六月 2021 10:11:25 +0800 Subject: [PATCH] add readme. --- utest/api_test.cpp | 4 +- README.md | 60 ++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md new file mode 100644 index 0000000..48b584d --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# 绠�浠� + +bhshmq 鍩轰簬鍏变韩鍐呭瓨鐨勬秷鎭�氳搴擄紝鏀寔 璇锋眰-搴旂瓟锛屽彂甯�-璁㈤槄 涓ょ閫氳鏂瑰紡銆� +瀹㈡埛绔�/鑺傜偣 闇�瑕佸厛鍚戠鐞嗕腑蹇冩敞鍐屾垚鍔熷悗鎵嶈兘姝e父鏀跺彂娑堟伅銆� + +# 寮�鍙戠幆澧冿細 + + ubuntu 18.04, g++-7.5, cmake, ninja, vscode + +# 渚濊禆搴擄細 + +## boost-1.75.0 + +### 鍑嗗 +涓嬭浇骞惰В鍘� boost 搴擄紝 缂栬瘧鍓嶉渶瑕佸厛淇敼榛樿缂栬瘧閫夐」锛氭墦寮� tools/build/src/tools/gcc.jam, 鎵惧埌濡備笅涓�琛岋細 + + compile-link-flags <link>shared/<target-os>$(non-windows) : -fPIC ; + +鍦ㄤ笅闈㈠鍔犲涓嬩竴琛岋細 + + compile-link-flags <link>static/<target-os>$(non-windows) : -fPIC ; + +### 缂栬瘧: + +```shell + ./bootstrap.sh + ./b2 --with-timer --with-test --with-log link=static runtime-link=static threading=multi +``` + +### 瀹夎: + 鍙互鐩存帴鎶婁唬鐮佸拰搴撹繛鎺ュ埌 /usr/local/include 鍜� /usr/local/lib + +```shell + cd /usr/local/include + sudo ln <path_to_boost>/boost ./ -s + cd /usr/local/lib + sudo ln <path_to_boost>/stage/lib/lib*.a ./ -s +``` + +## protobuf-3.17.0 + +### 鍑嗗 + +涓嬭浇骞惰В鍘� protobuf 搴�. + +### 缂栬瘧锛� + +```shell + ./configure CFLAGS=-fPIC CXXFLAGS="-g -std=c++14 -DNDEBUG -fPIC -ffunction-sections -fdata-sections" LDFLAGS="-fPIC -static-libstdc++" + make + sudo make install +``` + +# bhshmq 缂栬瘧 + +```shell + mkdir build; cd build + cmake -G Ninja -DCMAKE_BUILD_TYPE=RELEASE .. + ninja +``` diff --git a/utest/api_test.cpp b/utest/api_test.cpp index b4e0f4b..5363d6e 100644 --- a/utest/api_test.cpp +++ b/utest/api_test.cpp @@ -293,8 +293,8 @@ host.set_ip("127.0.0.1"); host.set_port(kBHCenterPort); // center topic node address. - host.set_mq_id(201); - host.set_abs_addr(10072); + // host.set_mq_id(201); + // host.set_abs_addr(10072); std::string dest(host.SerializeAsString()); void *proc_id = 0; -- Gitblit v1.8.0