开发者

Link error (LNK2019) when including other projects in Visual Studio 2005

I am trying to work with several projects on visual studio 2005. I have one project that depend开发者_如何学Gos on two others. I have included those two project in the first project solution, and set the dependencies correctly.

I get this error when linking the project:

1>server_controller.obj : error LNK2019: unresolved external symbol "public: __thiscall server_communication::TcpServer::TcpServer(class boost::asio::io_service &,struct server_communication::ServerParameters &)" (??0TcpServer@server_communication@@QAE@AAVio_service@asio@boost@@AAUServerParameters@1@@Z) referenced in function "public: __thiscall server_controller::ServerController::ServerController(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0ServerController@server_controller@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)

I seems that the symbols can not be found in the other projects, even though there are defined in those projects.


How did you set dependencies? In C++ you need to set linker dependencies in Project - Properties - Linker - Additional libraries. Add required .lib files here.

About solution Dependencies dialog: it only affects projects build order, but doesn't resolve linker dependencies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜