Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译错误:error: ‘NacosServiceFactory’ was not declared in this scope #122

Open
lvfuchao opened this issue Aug 25, 2022 · 4 comments

Comments

@lvfuchao
Copy link

两个问题:

  1. 看了代码 NacosServiceFactory这个类是在你工程src目录下,应该对用户不可见的;应该在头文件Nacos.h里面声明并定义一个接口,用来初始化这个类
  2. 不知道有没有用c++11以上的新标准在重构sdk?
@guanxiaoguan
Copy link

巧了,我今天也遇到了这个问题.

@lvfuchao
Copy link
Author

他这个需要把用到这个类所有头文件都找出来才能编译成功, 所需要头文件如下:
NacosServiceFactory.h
Mutex.h
Tid.h
TimeUtils.h

@guanxiaoguan
Copy link

多谢,加上头文件后可以编译通过,程序注册之后隔一会儿就找不到了,可能需要传心跳包吧,我准备用open api来试试.

@xiedeacc
Copy link

多谢,加上头文件后可以编译通过,程序注册之后隔一会儿就找不到了,可能需要传心跳包吧,我准备用open api来试试.

注册的时候设置为临时,会自动发心跳包的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants