PengZheng commented on issue #706: URL: https://github.com/apache/celix/issues/706#issuecomment-1871884831
> "CtrlConsumer.h" can find and set break point successfully , but "plc_main.c" can not ? Of course you can't. I saw no usage of `plc_main.h` in the bundle. ```C++ //Ctrl bundle服务提供者和使用者 #include "celix/BundleActivator.h" #include "CtrlImpl.h" extern "C" { #include "plc_main.h" } class PlcCtrlBundle { public: //构造函数,初始化成员变量registration explicit PlcCtrlBundle(std::shared_ptr<celix::BundleContext> ctx) : registration{createPlcService(ctx)} { std::cout << "启动plc service bundle" << std::endl; } private: static std::shared_ptr<celix::ServiceRegistration> createPlcService(std::shared_ptr<celix::BundleContext>& ctx) { //绑定,赋值 int seed = 42; std::cout << "注册plc service bundle" << std::endl; //注册服务 return ctx->registerService<ACEPHERE_RUNTIME::ICtrl>(std::make_shared<ACEPHERE_RUNTIME::CtrlImpl>(seed)) .addProperty("seed", seed) .build(); } //作为服务端 const std::shared_ptr<celix::ServiceRegistration> registration; }; CELIX_GEN_CXX_BUNDLE_ACTIVATOR(PlcCtrlBundle) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org