{"action":"created","issue":{"url":"https://api.github.com/repos/chenxiaoqino/udp-image-streaming/issues/10","repository_url":"https://api.github.com/repos/chenxiaoqino/udp-image-streaming","labels_url":"https://api.github.com/repos/chenxiaoqino/udp-image-streaming/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/chenxiaoqino/udp-image-streaming/issues/10/comments","events_url":"https://api.github.com/repos/chenxiaoqino/udp-image-streaming/issues/10/events","html_url":"https://github.com/chenxiaoqino/udp-image-streaming/issues/10","id":345474938,"node_id":"MDU6SXNzdWUzNDU0NzQ5Mzg=","number":10,"title":"LNK2019 when build in Visual Studio 2017","user":{"login":"kxu-ffd","id":36250581,"node_id":"MDQ6VXNlcjM2MjUwNTgx","avatar_url":"https://avatars3.githubusercontent.com/u/36250581?v=4","gravatar_id":"","url":"https://api.github.com/users/kxu-ffd","html_url":"https://github.com/kxu-ffd","followers_url":"https://api.github.com/users/kxu-ffd/followers","following_url":"https://api.github.com/users/kxu-ffd/following{/other_user}","gists_url":"https://api.github.com/users/kxu-ffd/gists{/gist_id}","starred_url":"https://api.github.com/users/kxu-ffd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kxu-ffd/subscriptions","organizations_url":"https://api.github.com/users/kxu-ffd/orgs","repos_url":"https://api.github.com/users/kxu-ffd/repos","events_url":"https://api.github.com/users/kxu-ffd/events{/privacy}","received_events_url":"https://api.github.com/users/kxu-ffd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-28T20:00:12Z","updated_at":"2018-07-30T20:39:02Z","closed_at":null,"author_association":"NONE","body":"Hi, I am trying your solution to stream OpenCV processed images from one computer to another. However, I am stuck at the build step. It seems the VS compiler is not able to link the functions in TCPServerSocket. No issue during the cmake. I tried to modify the CMakeLists.txt to explicitly include the header files, but it does not work. Strangely, I am able to build the project in Ubuntu. The attached is the error log from VS 2017.\r\n\r\nPracticalSocket.obj : error LNK2019: unresolved external symbol accept referenced in function \"public: class TCPSocket * __cdecl TCPServerSocket::accept(void)\" (?accept@TCPServerSocket@@QEAAPEAVTCPSocket@@XZ)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol bind referenced in function \"public: void __cdecl Socket::setLocalPort(unsigned short)\" (?setLocalPort@Socket@@QEAAXG@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol closesocket referenced in function \"public: __cdecl Socket::~Socket(void)\" (??1Socket@@QEAA@XZ)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol connect referenced in function \"public: void __cdecl CommunicatingSocket::connect(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short)\" (?connect@CommunicatingSocket@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@G@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol getpeername referenced in function \"public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CommunicatingSocket::getForeignAddress(void)\" (?getForeignAddress@CommunicatingSocket@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)\r\n3>Generating Code...\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol getsockname referenced in function \"public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Socket::getLocalAddress(void)\" (?getLocalAddress@Socket@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol htonl referenced in function \"public: void __cdecl Socket::setLocalPort(unsigned short)\" (?setLocalPort@Socket@@QEAAXG@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol htons referenced in function \"public: void __cdecl Socket::setLocalPort(unsigned short)\" (?setLocalPort@Socket@@QEAAXG@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol inet_addr referenced in function \"public: void __cdecl UDPSocket::joinGroup(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (?joinGroup@UDPSocket@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol inet_ntoa referenced in function \"public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Socket::getLocalAddress(void)\" (?getLocalAddress@Socket@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol listen referenced in function \"private: void __cdecl TCPServerSocket::setListen(int)\" (?setListen@TCPServerSocket@@AEAAXH@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol ntohs referenced in function \"public: unsigned short __cdecl Socket::getLocalPort(void)\" (?getLocalPort@Socket@@QEAAGXZ)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol recv referenced in function \"public: int __cdecl CommunicatingSocket::recv(void *,int)\" (?recv@CommunicatingSocket@@QEAAHPEAXH@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol recvfrom referenced in function \"public: int __cdecl UDPSocket::recvFrom(void *,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,unsigned short &)\" (?recvFrom@UDPSocket@@QEAAHPEAXHAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAG@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol send referenced in function \"public: void __cdecl CommunicatingSocket::send(void const *,int)\" (?send@CommunicatingSocket@@QEAAXPEBXH@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol sendto referenced in function \"public: void __cdecl UDPSocket::sendTo(void const *,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short)\" (?sendTo@UDPSocket@@QEAAXPEBXHAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@G@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol setsockopt referenced in function \"public: void __cdecl UDPSocket::setMulticastTTL(unsigned char)\" (?setMulticastTTL@UDPSocket@@QEAAXE@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol socket referenced in function \"protected: __cdecl Socket::Socket(int,int)\" (??0Socket@@IEAA@HH@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol gethostbyname referenced in function \"void __cdecl fillAddr(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short,struct sockaddr_in &)\" (?fillAddr@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@GAEAUsockaddr_in@@@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol getservbyname referenced in function \"public: static unsigned short __cdecl Socket::resolveService(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (?resolveService@Socket@@SAGAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol WSAStartup referenced in function \"protected: __cdecl Socket::Socket(int,int)\" (??0Socket@@IEAA@HH@Z)\r\n2>PracticalSocket.obj : error LNK2019: unresolved external symbol WSACleanup referenced in function \"public: static void __cdecl Socket::cleanUp(void)\" (?cleanUp@Socket@@SAXXZ)"},"comment":{"url":"https://api.github.com/repos/chenxiaoqino/udp-image-streaming/issues/comments/409002161","html_url":"https://github.com/chenxiaoqino/udp-image-streaming/issues/10#issuecomment-409002161","issue_url":"https://api.github.com/repos/chenxiaoqino/udp-image-streaming/issues/10","id":409002161,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTAwMjE2MQ==","user":{"login":"email2jie","id":16471061,"node_id":"MDQ6VXNlcjE2NDcxMDYx","avatar_url":"https://avatars0.githubusercontent.com/u/16471061?v=4","gravatar_id":"","url":"https://api.github.com/users/email2jie","html_url":"https://github.com/email2jie","followers_url":"https://api.github.com/users/email2jie/followers","following_url":"https://api.github.com/users/email2jie/following{/other_user}","gists_url":"https://api.github.com/users/email2jie/gists{/gist_id}","starred_url":"https://api.github.com/users/email2jie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/email2jie/subscriptions","organizations_url":"https://api.github.com/users/email2jie/orgs","repos_url":"https://api.github.com/users/email2jie/repos","events_url":"https://api.github.com/users/email2jie/events{/privacy}","received_events_url":"https://api.github.com/users/email2jie/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T20:39:02Z","updated_at":"2018-07-30T20:39:02Z","author_association":"NONE","body":"It may have to do with something is not working well with x64. I tried compiling this for windows in Visual Studios, at first it was just saying my target machine was x86. But after I changed the target machine it started to not recognize the functions. Do you know if practical socket works on x64 bit machines?"}}
{"actor":{"display_login":"email2jie"}}