CppServer
CppServer copied to clipboard
Error in linking to existing project
I have a tcp parser which will parse data from a external device and i want to multicast this parsed data to 30+ clients.
My project is in Netbeans. I successfully build this project in my machine. I am linking CPPServer to my exisating project, But i am getting following errors
/usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function
CppServer::Asio::Service::Restart()':
service.cpp:(.text+0x1fd): undefined reference to asio::io_context::io_context()' /usr/bin/ld: service.cpp:(.text+0x2f1): undefined reference to
asio::detail::service_registry::do_use_service(asio::execution_context::service::key const&, asio::execution_context::service* ()(void), void*)'
/usr/bin/ld: service.cpp:(.text+0x301): undefined reference to asio::detail::strand_service::construct(asio::detail::strand_service::strand_impl*&)' /usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function
CppServer::Asio::Service::ServiceThread(std::shared_ptrCppServer::Asio::Service const&, std::shared_ptrasio::io_context const&)':
service.cpp:(.text+0x603): undefined reference to asio::io_context::poll()' /usr/bin/ld: service.cpp:(.text+0x617): undefined reference to
CppCommon::Thread::Yield()'
/usr/bin/ld: service.cpp:(.text+0x635): undefined reference to asio::io_context::run()' /usr/bin/ld: service.cpp:(.text+0x684): undefined reference to
asio::detail::scheduler::stop()'
/usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function std::thread::_State_impl<std::thread::_Invoker<std::tuple<CppCommon::Thread::Start<CppServer::Asio::Service::Start(bool)::{lambda()#2}>(CppServer::Asio::Service::Start(bool)::{lambda()#2}&&)::{lambda()#1}> > >::_M_run()': service.cpp:(.text+0x6d9): undefined reference to
CppCommon::ExceptionsHandler::SetupThread()'
/usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function CppServer::Asio::Service::Stop()': service.cpp:(.text+0x7f2): undefined reference to
asio::asio_handler_allocate(unsigned long, ...)'
/usr/bin/ld: service.cpp:(.text+0x843): undefined reference to asio::detail::strand_service::do_post(asio::detail::strand_service::strand_impl*&, asio::detail::scheduler_operation*, bool)' /usr/bin/ld: service.cpp:(.text+0x8be): undefined reference to
asio::asio_handler_allocate(unsigned long, ...)'
/usr/bin/ld: service.cpp:(.text+0x90d): undefined reference to asio::detail::scheduler::post_immediate_completion(asio::detail::scheduler_operation*, bool)' /usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function
CppServer::Asio::Service::Start(bool)':
service.cpp:(.text+0xc59): undefined reference to asio::asio_handler_allocate(unsigned long, ...)' /usr/bin/ld: service.cpp:(.text+0xcad): undefined reference to
asio::detail::strand_service::do_post(asio::detail::strand_service::strand_impl*&, asio::detail::scheduler_operation*, bool)'
/usr/bin/ld: service.cpp:(.text+0xd16): undefined reference to asio::asio_handler_allocate(unsigned long, ...)' /usr/bin/ld: service.cpp:(.text+0xd66): undefined reference to
asio::detail::scheduler::post_immediate_completion(asio::detail::scheduler_operation*, bool)'
/usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function asio::detail::completion_handler<CppServer::Asio::Service::Start(bool)::{lambda()#1}, asio::io_context::basic_executor_type<std::allocator<void>, 0u> >::do_complete(void*, asio::detail::scheduler_operation*, std::error_code const&, unsigned long)': service.cpp:(.text+0x10e2): undefined reference to
asio::asio_handler_deallocate(void*, unsigned long, ...)'
/usr/bin/ld: service.cpp:(.text+0x118d): undefined reference to asio::asio_handler_deallocate(void*, unsigned long, ...)' /usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function
asio::detail::completion_handler<CppServer::Asio::Service::Stop()::{lambda()#1}, asio::io_context::basic_executor_type<std::allocatorasio::asio_handler_deallocate(void*, unsigned long, ...)' /usr/bin/ld: service.cpp:(.text+0x133c): undefined reference to
asio::io_context::stop()'
/usr/bin/ld: service.cpp:(.text+0x13f1): undefined reference to asio::asio_handler_deallocate(void*, unsigned long, ...)' /usr/bin/ld: ../../n9m_new/live/CppServer/bin/libcppserver.a(service.cpp.o): in function
CppServer::Asio::Service::Service(int, bool)':
service.cpp:(.text+0x163c): undefined reference to asio::io_context::io_context()' /usr/bin/ld: service.cpp:(.text+0x1709): undefined reference to
asio::io_context::io_context()'
/usr/bin/ld: service.cpp:(.text+0x1867): undefined reference to asio::io_context::io_context()'
Where is the issue??