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

在使用库的过程中报undefined reference to 'muduo::net::EventLoop::runInLoop(boost::function<void ()> const&)'错误 #453

Open
keaideni opened this issue Apr 26, 2020 · 2 comments

Comments

@keaideni
Copy link

你好,我用的centos系统,在用这个库的过程中报错误undefined reference to 'muduo::net::EventLoop::runInLoop(boost::function<void ()> const&)',这个问题该怎么解决?

@chenshuo
Copy link
Owner

请使用提问模板,并阅读 提问须知

@janksenhu
Copy link

这个问题发现,链接时候调整,uduo_net,uduo_base的顺序就可以解决

add_executable(pingpong_client client.cc)
target_link_libraries(pingpong_client muduo_base muduo_net pthread)

add_executable(pingpong_server server.cc)
target_link_libraries(pingpong_server muduo_base muduo_net pthread)

add_executable(pingpong_bench bench.cc)
target_link_libraries(pingpong_bench muduo_net muduo_base pthread)

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