lichao
2021-05-19 e2be46888935358144da5434a0a1ac9d82d588fb
static link protobuf.
3个文件已修改
10 ■■■■ 已修改文件
api/bhsgo/bhome_node.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/bhsgo/bhome_node_test.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/CMakeLists.txt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/bhsgo/bhome_node.go
@@ -4,7 +4,7 @@
#include "bh_api_go.h"
*/
// #cgo LDFLAGS: -L/home/lichao/code/shmsg/build/lib -L/usr/local/lib -lbhome_shmq -lbhome_msg -lprotobuf-lite -lstdc++ -lpthread -lrt
// #cgo LDFLAGS: -L/home/lichao/code/shmsg/build/lib -L/usr/local/lib -lbhome_shmq -lstdc++ -lpthread -lrt
import "C"
import (
api/bhsgo/bhome_node_test.go
@@ -29,8 +29,6 @@
    reply := bh.MsgCommonReply{}
    defer Cleanup()
    StartWorker(ClientCallback, ServerCallback, SubDataCallback)
    r := Register(&proc, &reply, 1000)
    if r {
        fmt.Println("register ok")
@@ -53,6 +51,8 @@
        t.Log("register error")
        return
    }
    StartWorker(ClientCallback, ServerCallback, SubDataCallback)
    r = HeartbeatEasy(1000)
    if r {
@@ -81,7 +81,7 @@
    pid := ""
    rr := bh.MsgRequestTopicReply{}
    dest := bh.BHAddress{}
    for i := 0; i < 10000; i++ {
    for i := 0; i < 100; i++ {
        if Request(&dest, &req, &pid, &rr, 3000) {
            fmt.Println("server:" + pid + ", reply:" + string(rr.Data))
        } else {
src/CMakeLists.txt
@@ -10,5 +10,5 @@
set(LogLibs "boost_log;boost_log_setup;boost_thread;boost_filesystem")
target_link_libraries(${Target} bhome_msg ${LogLibs} pthread rt)
target_link_libraries(${Target} bhome_msg_static ${LogLibs} pthread rt)
target_link_libraries(${TargetStatic} bhome_msg_static ${LogLibs} pthread rt)