Windows 7 64位和Visual C ++ 2010上的64位应用程序中的简单套接字 [英] Simple socket in a 64 bit application on Windows 7 64 bit and Visual C++ 2010

查看:69
本文介绍了Windows 7 64位和Visual C ++ 2010上的64位应用程序中的简单套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要这方面的帮助。



我需要创建一个套接字(客户端/服务器)在Windows 7 64位系统上的Visual C ++ 2010上的64位应用程序。



例如,我的导师将此课程链接到我这一课



http://cs.baylor.edu/~donahoo/practical/CSockets/practical/



但它太旧了,似乎只用于32位应用程序。



我试图编译一个例子available(TCPEchoClient.cpp)但是Visual C ++给了我这些错误:



Hi everyone,
I need help about this situation.

I need to create a socket (client/server) in a 64bit application on Visual C++ 2010 in a windows 7 64bit system.

As example, my tutor link me this class

http://cs.baylor.edu/~donahoo/practical/CSockets/practical/

But it's too old, and seems made for only 32 bit application.

I've tried to compile an example of that available (TCPEchoClient.cpp) but visual C++ give me these errors:

1>------ Inizio compilazione: Progetto: sockt, Configurazione: Debug Win32 ------<br />
1>Compilazione avviata 19/03/2014 08:22:42.<br />
1>InitializeBuildStatus:<br />
1>  Aggiornamento timestamp di "Debug\sockt.unsuccessfulbuild".<br />
1>ClCompile:<br />
1>  Tutti gli output sono aggiornati.<br />
1>ManifestResourceCompile:<br />
1>  Tutti gli output sono aggiornati.<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: int __thiscall CommunicatingSocket::recv(void *,int)" (?recv@CommunicatingSocket@@QAEHPAXH@Z) non risolto nella funzione _main<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall CommunicatingSocket::send(void const *,int)" (?send@CommunicatingSocket@@QAEXPBXH@Z) non risolto nella funzione _main<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall TCPSocket::TCPSocket(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short)" (??0TCPSocket@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@G@Z) non risolto nella funzione _main<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall Socket::~Socket(void)" (??1Socket@@QAE@XZ) non risolto nella funzione "public: __thiscall CommunicatingSocket::~CommunicatingSocket(void)" (??1CommunicatingSocket@@QAE@XZ)<br />
1>C:\OPENCV\Test\miei\provefunzioni\sockt\Debug\sockt.exe : fatal error LNK1120: 4 esterni non risolti<br />
1><br />
1>Compilazione NON RIUSCITA.





现在,我认为这是关于这个类需要的库,我在google上发现了wsock32。 lib在Windows 7上被替换为dll,ws2_32.dll,其中包含该库的32位和64位版本。



我在


C:\Program Files(x86)\ Mysoftoft SDKs \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ c $ c>



但是,即使我为附加库设置此路径,程序也无法编译。



如何在64位项目中使用此类?



或者,有人可以告诉我一个简单的模式,在Windows 7 64bit上的visual c ++ 2010的64位项目中创建一个套接字客户端/服务器吗?



提前谢谢。



Now, I think it's about the library that this class need, and I've found on google that wsock32.lib it's replaced on windows 7 with a dll, ws2_32.dll, that contain the 32 and 64 bit version of that lib.

I've found it on

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64

but, even I set this path for "additional library" the program don't compile.

How can I use this class on my 64bit project?

Or, someone can tell me a simple mode to create a socket client/server in a 64bit project of visual c++ 2010 on Windows 7 64bit??

Thanks in advance.

推荐答案

basic_string @ DU?
basic_string@DU?


char_traits @ D @ std @@ V?
char_traits@D@std@@V?


allocator @ D @ 2 @@ std @@ G @ Z)non risolto nella funzione _main< br />
1> TCPEchoClient.obj :错误LNK2019:riferimento al simbolo esternopublic:__thiscall Socket ::〜Socket(void)(?? 1Socket @@ QAE @XZ)non risolto nella funzionepublic:__thiscall CommunicatingSocket :: ~CommunicationSocket(void)(? ?1CommunicatingSocket @@ QAE @ XZ)< br />
1> C:\ OPENCV\Test\miei\provefunzioni \ sockt \Debug\sockt.exe:致命错误LNK1120:4 esterni non risolti< br />
1>< br />
1> Compilazione NON RIUSCITA。
allocator@D@2@@std@@G@Z) non risolto nella funzione _main<br /> 1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall Socket::~Socket(void)" (??1Socket@@QAE@XZ) non risolto nella funzione "public: __thiscall CommunicatingSocket::~CommunicatingSocket(void)" (??1CommunicatingSocket@@QAE@XZ)<br /> 1>C:\OPENCV\Test\miei\provefunzioni\sockt\Debug\sockt.exe : fatal error LNK1120: 4 esterni non risolti<br /> 1><br /> 1>Compilazione NON RIUSCITA.





现在,我认为这是关于本课程所需的图书馆,而且我已经在google上发现wsock32.lib它在Windows 7上被替换为dll,ws2_32.dll,其中包含该库的32位和64位版本。



我'我找到了它



C:\ Program Files(x86)\ MySoftoft SDKs \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ x64



但是,即使我为附加库设置此路径,程序也无法编译。



如何在64位项目中使用此课程?



或者,有人可以告诉我一个简单的模式,在Windows 7 64bit上的visual c ++ 2010的64位项目中创建一个套接字客户端/服务器吗?



提前致谢。



Now, I think it's about the library that this class need, and I've found on google that wsock32.lib it's replaced on windows 7 with a dll, ws2_32.dll, that contain the 32 and 64 bit version of that lib.

I've found it on

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64

but, even I set this path for "additional library" the program don't compile.

How can I use this class on my 64bit project?

Or, someone can tell me a simple mode to create a socket client/server in a 64bit project of visual c++ 2010 on Windows 7 64bit??

Thanks in advance.


这篇关于Windows 7 64位和Visual C ++ 2010上的64位应用程序中的简单套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆