Closed SandyKidYao closed 3 years ago
@SandyKidYao Can you show more logs? or test the re_dev branch.
Thx for reply. These are the logs I copied from the /root/logs/rocketmq-cpp folder.
13390_rocketmq-cpp.log 13128_rocketmq-cpp.log 13192_rocketmq-cpp.log
BTW, when I use the cpp test codes (both cpp-style and c-style), the log from rocket mq nameserver shows that they have connected to the nameserver while the log from the broker print nothing. I guess there may be sth wrong in the connection between my cpp program and the broker.
@SandyKidYao Can you compile cpp sdk from source?
I figured out what's wrong in my codes. If I link the librocketmq.so from CMake by TARGET_LINK_LIBRARIES(), the route error will happen. However, if I add the same lib (no matter installed via rpm or built from source code) through CMAKE_CXX_FLAGS, everything works fine.
THX for your time again.
It is crazy. In my opinion, TARGET_LINK_LIBRARIES is correct way, and it is better then use CMAKE_CXX_FLAGS.
It is crazy. In my opinion, TARGET_LINK_LIBRARIES is correct way, and it is better then use CMAKE_CXX_FLAGS.
While I am using other libs in my program too, it may be related to the link order between these libs.
@SandyKidYao The re_dev branch is recommend to use, you can test it.
The msg producer works with python api but not working in cpp. The error msg is "No route info of this topic: ".
In fact the python api is rely on the cpp client, and it works fine while the cpp codes don't, I hope someone can give a little help with my problem ( I run the example and got the similar error).
The test code (c-style) in cpp like below
And the cpp-style test code
The test code in python works fine, like this.
The logs generated by cpp codes are a little different from the ones by python code. There are lots of warnings. I tried to figure out what happened but got noting valuable.