|
Look at the stack size of the CreateThread function:
HANDLE WINAPI CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);
The default dwStackSize is zero. It means each thread has 1 megabyte stack space and you can create at most 2028 threads but it need several GB virtual memory so if we reduce default stack size to 1024*512 (0.5Mb) we can create double number of the thread. Can it be a solution to increase number of the client? can any one give me other idea?
Reference to 'Remarks' of http://msdn2.microsoft.com/en-us/library/ms682453.aspx
|
|
|
|
|
I'm storing and showing the clients IP at startup, but it sometimes returns the host IP instead. Why's this?
|
|
|
|
|
This applies to MS Visual C++ 6.0
1) I set up the following directory structure:
- singleServerMultipleClientSrc\client
- singleServerMultipleClientSrc\server
- singleServerMultipleClientSrc\common <= I created this one
2) Then I created a new blank workspace within the singleServerMultipleClientSrc directory
( I called it MultiClientServer )
3) Create 2 projects, Client and Server, within the client and server directories respectively
- make both of them a "Win32 Console Application"
4) Move the following files into the common directory...
- ..\client\myLog.h
- ..\client\myLog.cpp
5) Select the "Source Files" directory for each Project and Add all of the .cpp files within the respective folder (i.e., client or server. ALSO add all of the .cpp files from the "common" directory!
6) Select the "Header Files" directory for each Project and Add all of the .h files within the respective folder (i.e., client or server). ALSO add all of the .h files from the "common" directory!
7) Edit the source files to get rid of the bogus paths...
For example: #include "..\mySocket\mySocket.h" => #include "mySocket.h"
8) Fix the Project Settings accordingly
Project Menu => Settings... (Make sure BOTH projects are selected in left panel)
C/C++ Tab => Preprocessor Category:
- Add "..\common" to the "Additional include directories" (w/o quotes)
Link Tab => Input Category:
- Add "ws2_32.lib" to the Object/library modules (w/o quotes)
9) Build both the client and server!!!
10) Edit the serverConfig.txt file within the client directory and enter your IP address
Note: I just specified it as 127.0.0.1 instead of specify a hard IP address since I'm running them both on the same machine!
11) Copy the serverConfig.txt file to the same directory as the client executable
12) Run server first, then the client from separate consoles.
Hopefully, this will resolve your issues, as it did for me.
Good Luck!
Kirk
|
|
|
|
|
Thanks for the nice summary, this will work for sure.
|
|
|
|
|
Help Please
1. how check cd writter (how many copy Writted)
2. how check the printer(how many pages prited)
3. how to find how many MB download from internet
|
|
|
|
|
Hi,
I am not able to connect to this server after giving the dynamic ip addrees provided by the isp. Is there anything special I need to do inorder to be able to connect over internet.
Shweata
|
|
|
|
|
are you using your home PC as the server as well as the client? or are you trying to connect to some other server somewhere else? if this is true, ie. you are trying to connect to some other server somewhere else, the firewall most likely be the reason you cannot get in.
let me know more. if you are using your home pc as both the client and server, you should have no problem at all. just follow carefully the instrucutions in this article.
|
|
|
|
|
My PCs(server and client) are on LAN. Whenever I try to connect by using the Local address everthing works fine. But when I try to connect by providing the web address(dynamic address) provided to my PCs by ISP I am unable to connect. I enter this dynamic ip in the config file as mentioned in this article. One more thing which I would like to mention is that the application only detects the local ip address and not the one provided by ISP.
Shweta
|
|
|
|
|
Try using gethostbyname() instead of gethostbyaddr. Pass the server ip adress to gethostbyname().
Alternatively you can also use getnameinfo(). gethostbyaddr may eventually resort to using NetBIOS (port 137) to come up with the name. According to MSDN, gethostbyaddr is actually deprecated by the getnameinfo API. getnameinfo does a reverse lookup of an IP Address without using NetBIOS.
-Narad
|
|
|
|
|
Hello Friends,
Actually I am try to develop the Application to manage my browsing center. I need given points
1. How many system currently connect to the internet
2. If the no of system connected, how long the system continue this connect.(when login/logout)
3. If the system is conneted, list out the user name.
4. If the user used printer, How many pages they printed.
5. If the user used cd-writer, How many CDs they writed.
Please send any helps tips my id or display FAQ Page
|
|
|
|
|
I really want to use this code to build a prototype project but I have been killed by all the compile issues. I have gone into the source and edited the #include to get past some erors only to get stopped with new ones. How did this ever compile?
What we all need is a set of source code in the correct directroy structure and the step by stpe process to set up the Microsoft CLI VC++ compiler so it works. The #include file.H references all have to be changed and then you get to new problems.
I have spent considerable time time trying to compile my way through this and it is not going well.
I would appreciate any information you have to use this code.
Regards
MC
MC
|
|
|
|
|
Mike,
Could you please show me show error messages when you do the compile?
|
|
|
|
|
Before I provide the error messages:
I have noticed more that one location to download your code from this site and the documentation is also differnet. How does one get the latest version?
It would also be exteeemly helpfull to have same directory structure you used to complile from along with any compiler options. Include file help or notes would be appriciated as well. Is there another FTP site?
I was hoping to get a runing start at a prototype project and not hae to do all the basicallly do all the same things you code provides
I have not modified all of the moudles to point to a single source folder yet and could be the cause of some of the errors but here is where I am at the moment. I am assuming most of these errors will resolve with the appropriate includes and folder refernces.
I compiled two programs: MyLog and MyClient.
Thanks for responding.
Mike C
Compiler and set up: Microsoft Visual C++ Tool Kit 2003 (CLI).
Compiler installed in default Program Files\...\.
VCVARS32.bat executed for Includes (see below)
C:\Program Files\Microsoft Visual C++ Toolkit 2003>set include
INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Fi
les\Microsoft Platform SDK\Include;C:\Program Files\Microsoft Visual Studio .NET
\FrameworkSDK\include\
//////////////////////////////////////////////////////////
All source for Client located in c:\Client\
The first problem was all the error messages that are genrated without the /EHs option set.
Next I received file not found errors on all the #include(s) that refer to a directory structure that is not how the code is downloaded.
I basically modified the code from:
#include "..\mySocket\mySocket.h"
#include "..\myLog\myLog.h"
#include "..\myException\myException.h"
#include "..\myHostInfo\myHostInfo.h"
to:
#include "mySocket.h"
#include "myLog.h"
#include "myException.h"
#include "myHostInfo.h"
/////////////////////////////////////////////////
OUTPUT from MyLog compile:
C:\client>cl mylog.cpp /EHs
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
mylog.cpp
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
/out:mylog.exe
mylog.obj
LIBC.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced
in function _mainCRTStartup
mylog.exe : fatal error LNK1120: 1 unresolved externals
/////////////////////////////////////////////////////////////////////////
OUTPUT form MyClinet
C:\client>cl myclient.cpp /EHs
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
myclient.cpp
c:\client\myHostInfo.h(28) : error C2871: 'std' : a namespace with this name doe
s not exist
c:\client\myHostInfo.h(68) : error C2143: syntax error : missing ')' before '&'
c:\client\myHostInfo.h(68) : error C2143: syntax error : missing ';' before '&'
c:\client\myHostInfo.h(68) : error C2460: 'myHostInfo::string' : uses 'myHostInf
o', which is being defined
c:\client\myHostInfo.h(52) : see declaration of 'myHostInfo'
c:\client\myHostInfo.h(68) : error C2501: 'myHostInfo::hostName' : missing stora
ge-class or type specifiers
c:\client\myHostInfo.h(68) : error C2146: syntax error : missing ';' before iden
tifier 'type'
c:\client\myHostInfo.h(68) : error C2501: 'myHostInfo::hostType' : missing stora
ge-class or type specifiers
c:\client\myHostInfo.h(68) : error C2059: syntax error : ')'
c:\client\myHostInfo.h(68) : error C2501: 'myHostInfo::type' : missing storage-c
lass or type specifiers
c:\client\myHostInfo.h(112) : error C2061: syntax error : identifier 'string'
c:\client\myHostInfo.h(113) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(94) : error C2143: syntax error : missing ';' before '&'
c:\client\mySocket.h(94) : error C2433: 'ostream' : 'friend' not permitted on da
ta declarations
c:\client\mySocket.h(94) : error C2501: 'ostream' : missing storage-class or typ
e specifiers
c:\client\mySocket.h(94) : error C2061: syntax error : identifier 'ostream'
c:\client\mySocket.h(94) : error C2501: 'mySocket::operator`<<'' : missing stora
ge-class or type specifiers
c:\client\mySocket.h(94) : error C2805: binary 'operator <<' has too few paramet
ers
c:\client\mySocket.h(100) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(101) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(102) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(120) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(149) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(154) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(167) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(173) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(177) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(178) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(179) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(180) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(181) : error C2061: syntax error : identifier 'string'
c:\client\mySocket.h(182) : error C2061: syntax error : identifier 'string'
myClient.cpp(33) : error C2661: 'myHostInfo::myHostInfo' : no overloaded functio
n takes 2 arguments
myClient.cpp(42) : error C2679: binary '<<' : no operator found which takes a ri
ght-hand operand of type 'myTcpSocket' (or there is no acceptable conversion)
myClient.cpp(44) : error C2679: binary '<<' : no operator found which takes a ri
ght-hand operand of type 'myTcpSocket' (or there is no acceptable conversion)
myClient.cpp(49) : error C2660: 'myTcpSocket::connectToServer' : function does n
ot take 2 arguments
myClient.cpp(61) : error C2660: 'myTcpSocket::sendMessage' : function does not t
ake 1 arguments
myClient.cpp(66) : error C2660: 'myTcpSocket::recieveMessage' : function does no
t take 1 arguments
Mike Clark
|
|
|
|
|
did you get the earlier message I sent? I reveived a web page error from this site just after it started transmitting.
Mike
|
|
|
|
|
Mike,
I received your message.
I did not quite get this CLI thing: I was using VC++6.0 when I was developing the code in this article. If you wanted to compile it using VC.net, I am sure it will give you tons of strange errors. Do you have VC++6.0 handy? Other people had use VC++6.0 to compile it without trouble. Let me know more about the environment you are using.
Sorry for not being able to provide any concrete help.
|
|
|
|
|
The CLI thing is Command Line Input version of the compiler (old school, sorry). I am specifficaly not using .Net.
All I really want to do is be able to compile and execute all the progrms first. Then I want to add some additional code on both client and server.
I have the MC VC ++ complier took ket 2003 and I have Visual Studio .Net.
Tha challen is the file structure that you get with the download.zip files is not usabel.
If you go to this site and download your files you would see wht I am trying to explain. They will not compile as is.
Regards
Mike
|
|
|
|
|
I am glad you are using VC6.0 too. Yes, I did download the zip from this site and I did unzip it and it creates two directories, one for the client and one for the server, and it compiled fine.
I also read this article again: all you need is clearly written in the article, I guess you just need a little patience? Also, other folks can do it without problem. try it again, build the two projects (one for the client, one for the server), follow the instructions here, it should work.
|
|
|
|
|
Thanks again.
Help me understand what you mean exatly by projects. I have not been using any project support from the compiler and have been trying to compile each program in a stand alone mode. Are you creating a "project" and then adding the source to the project. Since i did not see any porject files I assume this was the way to go.
I will re-read the doc.
Thank you for your patience.
Mike
|
|
|
|
|
oh, I finally understand what you meant. I think the thing you need to do is to use microsoft visual C++ 6.0, and it has an IDE (intergrated development environment), in this IDE, you can create a "project" and do the compile and debug etc.
The very top of this article has a link, "Download source - 40 Kb", click on this link to download the source code, it is a zip file and when you unzip it, it creates two directories, one is for the client, one is for the server.
Start the IDE from VC6.0, use the "new" menu to create a "project", for example, for the server first, name it whatever you want to, and add all the files from in the server directory into this project and start to compile, it should be compiling with no problems.
Create another "project" in the VC6.0 IDE for the client, and add all the files from the client directory into this project and compile. you should be fine.
|
|
|
|
|
I have jumped to the Visal Studion .Net 2005 Beta.
I built a project for the client, set the C++ option to no procompiled headers, win32 app, and did a build soluion. Received Error C1083 file not found for #include files. The downloaded directroy and folder structure does not match the #include statements in the code.
Do I creatre the folders and copy the code or change the #include statements in all the source?
#include "..\mySocket\mySocket.h"
#include "..\myLog\myLog.h"
#include "..\myException\myException.h"
#include "..\myHostInfo\myHostInfo.h"
Also received several warning messages.
Thanks
Mike
He is the output form the Build solution:
Compiling...
CS_Client.cpp
myClient.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\myclient.cpp(1) : fatal error C1083: Cannot open include file: '..\mySocket\mySocket.h': No such file or directory
myException.cpp
myHostInfo.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\myhostinfo.cpp(2) : fatal error C1083: Cannot open include file: '..\myLog\myLog.h': No such file or directory
myLog.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(100) : warning C4996: 'gmtime' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\time.inl(87) : see declaration of 'gmtime'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(114) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(115) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(118) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(140) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
mySocket.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.h(4) : fatal error C1083: Cannot open include file: '../myHostInfo/myHostInfo.h': No such file or directory
Generating Code...
|
|
|
|
|
Mike,
I did the following, as you can see:
#include "..\mySocket\mySocket.h"
#include "..\myLog\myLog.h"
#include "..\myException\myException.h"
#include "..\myHostInfo\myHostInfo.h"
so I kinda of hard-coded the path for each of the .h file - you can put the .h files anywhere you want, but you do have to change the path here to reflect the changes you have made. the easiest thing to do is to put all the .h files together with the .cpp files in the same directory, and then change the above code into the following:
#include "mySocket.h"
#include "myLog.h"
#include "myException.h"
#include "myHostInfo.h"
the compiler will then easily find all the .h files.
|
|
|
|
|
Hi Liyang,
I have been offline for a while due to hurricane Rita (i live in the NW Houston area).
I got by the compile #include issues only to run into a linker problem which i am sure is easy to resolve. I compiled this using VS VC++ beta2005 and VS VC++ 6.0 and saw the same error messages. I have included beta2005 output in this message.
Are there "additional library" that I need to include?
Build Log Rebuild started: Project: CS_Client, Configuration: Debug|Win32
Command Lines Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000051986427192.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /GS- /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP /prefast ..\..\mySocket.cpp
..\..\myLog.cpp
..\..\myHostInfo.cpp
..\..\myException.cpp
..\..\myClient.cpp
.\CS_Client.cpp
]
Creating command line "cl.exe @c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000051986427192.rsp /nologo /errorReport:prompt"
Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000061986427192.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /GS- /Yc"stdafx.h" /Fp"Debug\CS_Client.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP /prefast .\stdafx.cpp
]
Creating command line "cl.exe @c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000061986427192.rsp /nologo /errorReport:prompt"
Creating command line "rc.exe /d "_UNICODE" /d "UNICODE" /fo"Debug/CS_Client.res" .\CS_Client.rc"
Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\TMP0000071986427192.tmp" with contents
[
1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ ".\\Debug\\CS_Client.exe.embed.manifest"
]
Creating command line "rc.exe /fo".\Debug\CS_Client.exe.embed.manifest.res" c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\TMP0000071986427192.tmp"
Creating temporary file "c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000081986427192.rsp" with contents
[
/OUT:"Debug\CS_Client.exe" /INCREMENTAL /MANIFEST /MANIFESTFILE:"Debug\CS_Client.exe.intermediate.manifest" /DEBUG /PDB:"c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\CS_Client.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
".\Debug\CS_Client.obj"
".\Debug\myClient.obj"
".\Debug\myException.obj"
".\Debug\myHostInfo.obj"
".\Debug\myLog.obj"
".\Debug\mySocket.obj"
".\Debug\stdafx.obj"
".\Debug\CS_Client.res"
".\Debug\CS_Client.exe.embed.manifest.res"
]
Creating command line "link.exe @c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\RSP0000081986427192.rsp /NOLOGO /ERRORREPORT:PROMPT"
Output Window Compiling...
cl : Command line warning D9035 : option 'prefast' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'analyze' instead of 'prefast'
stdafx.cpp
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(708) : warning C6054: string '_Source' may not be zero-terminated: Lines: 705, 708
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(717) : warning C6054: string '_Source' may not be zero-terminated: Lines: 714, 717
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Source' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Source' may not be zero-terminated: Lines: 734, 737
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 734, 737
Compiling...
cl : Command line warning D9035 : option 'prefast' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'analyze' instead of 'prefast'
CS_Client.cpp
myClient.cpp
myException.cpp
myHostInfo.cpp
myLog.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(100) : warning C4996: 'gmtime' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\time.inl(87) : see declaration of 'gmtime'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(114) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(115) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(118) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mylog.cpp(140) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
mySocket.cpp
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(14) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(1080) : warning C4244: '=' : conversion from 'SOCKET' to 'int', possible loss of data
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(1191) : warning C4996: 'sprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'
c:\source\singleservermultipleclient_src_2\singleservermultipleclientsrc\client\mysocket.cpp(1198) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
Processing...
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(912) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(911) : while compiling class template member function 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::append(const _Elem *)'
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(2057) : see reference to class template instantiation 'std::basic_string<_Elem,_Traits,_Ax>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(340) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(332) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,std::_Bool &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(912) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(911) : while compiling class template member function 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::append(const _Elem *)'
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(2057) : see reference to class template instantiation 'std::basic_string<_Elem,_Traits,_Ax>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Ax=std::allocator
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1353) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=char,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(459) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 452, 456, 457, 458, 459
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(455) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,__int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(1359) : see reference to class template instantiation 'std::num_get<_Elem,_InIt>' being compiled
with
[
_Elem=wchar_t,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(479) : warning C6054: string '*argument 2' may not be zero-terminated: Lines: 472, 476, 477, 478, 479
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(475) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,unsigned __int64 &) const'
with
[
_Elem=wchar_t,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6237: ( && ) is always zero. is never evaluated and may have side effects
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'int std::basic_filebuf<_Elem,_Traits>::pbackfail(int)'
with
[
_Elem=char,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(549) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(299) : warning C6239: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(285) : while compiling class template member function 'unsigned short std::basic_filebuf<_Elem,_Traits>::pbackfail(unsigned short)'
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(551) : see reference to class template instantiation 'std::basic_filebuf<_Elem,_Traits>' being compiled
with
[
_Elem=wchar_t,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(471) : warning C6240: ( && ) always evaluates to the result of . Did you intend to use the bitwise-and operator?
C:\Program Files\Microsoft Visual Studio 8\VC\include\fstream(459) : while compiling class template member function 'void std::basic_filebuf<_Elem,_Traits>::_Init(_iobuf *,std::basic_filebuf<_Elem,_Traits>::_Initfl)'
with
[
_Elem=char,
_Traits=std::char_traits
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(107) : warning C6011: dereferencing NULL pointer '_Myptr': Lines: 93, 96, 97, 107
C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring(88) : while compiling class template member function 'const char &std::_String_const_iterator<_Elem,_Traits,_Alloc>::operator *(void) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(340) : see reference to class template instantiation 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits,
_Alloc=std::allocator
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(332) : while compiling class template member function 'std::istreambuf_iterator<_Elem,_Traits> std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,std::_Bool &) const'
with
[
_Elem=char,
_Traits=std::char_traits,
_InIt=std::istreambuf_iterator>
]
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(708) : warning C6054: string '_Source' may not be zero-terminated: Lines: 705, 708
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(717) : warning C6054: string '_Source' may not be zero-terminated: Lines: 714, 717
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Source' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(728) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 725, 728
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Source' may not be zero-terminated: Lines: 734, 737
c:\Program Files\Microsoft Visual Studio 8\VC\include\tchar.h(737) : warning C6054: string '_Destination' may not be zero-terminated: Lines: 734, 737
Generating Code...
Compiling resources...
Compiling manifest to resources...
Linking...
myClient.obj : error LNK2019: unresolved external symbol __imp__inet_ntoa@4 referenced in function "public: char * __thiscall myHostInfo::getHostIPAddress(void)" (?getHostIPAddress@myHostInfo@@QAEPADXZ)
mySocket.obj : error LNK2001: unresolved external symbol __imp__inet_ntoa@4
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "public: __thiscall myHostInfo::myHostInfo(void)" (??0myHostInfo@@QAE@XZ)
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__gethostname@8 referenced in function "public: __thiscall myHostInfo::myHostInfo(void)" (??0myHostInfo@@QAE@XZ)
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__gethostbyaddr@12 referenced in function "public: __thiscall myHostInfo::myHostInfo(class std::basic_string,class std::allocator > &,enum hostType)" (??0myHostInfo@@QAE@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4hostType@@@Z)
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__inet_addr@4 referenced in function "public: __thiscall myHostInfo::myHostInfo(class std::basic_string,class std::allocator > &,enum hostType)" (??0myHostInfo@@QAE@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4hostType@@@Z)
mySocket.obj : error LNK2001: unresolved external symbol __imp__inet_addr@4
myHostInfo.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function "private: void __thiscall myHostInfo::detectErrorGethostbyname(int *,class std::basic_string,class std::allocator > &)" (?detectErrorGethostbyname@myHostInfo@@AAEXPAHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
mySocket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
mySocket.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function __catch$??0mySocket@@QAE@H@Z$0
mySocket.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function __catch$??0mySocket@@QAE@H@Z$0
mySocket.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: __thiscall mySocket::mySocket(int)" (??0mySocket@@QAE@H@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: virtual __thiscall mySocket::~mySocket(void)" (??1mySocket@@UAE@XZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "public: void __thiscall mySocket::setDebug(int)" (?setDebug@mySocket@@QAEXH@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function "public: void __thiscall mySocket::setSocketBlocking(int)" (?setSocketBlocking@mySocket@@QAEXH@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__getsockopt@20 referenced in function "public: int __thiscall mySocket::getDebug(void)" (?getDebug@mySocket@@QAEHXZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function "public: virtual __thiscall myTcpSocket::~myTcpSocket(void)" (??1myTcpSocket@@UAE@XZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "public: static void __cdecl myTcpSocket::initialize(void)" (?initialize@myTcpSocket@@SAXXZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: void __thiscall myTcpSocket::bindSocket(void)" (?bindSocket@myTcpSocket@@QAEXXZ)
mySocket.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "public: virtual void __thiscall myTcpSocket::connectToServer(class std::basic_string,class std::allocator > &,enum hostType)" (?connectToServer@myTcpSocket@@UAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4hostType@@@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function "public: class myTcpSocket * __thiscall myTcpSocket::acceptClient(class std::basic_string,class std::allocator > &)" (?acceptClient@myTcpSocket@@QAEPAV1@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function "public: void __thiscall myTcpSocket::listenToClient(int)" (?listenToClient@myTcpSocket@@QAEXH@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "public: int __thiscall myTcpSocket::sendMessage(class std::basic_string,class std::allocator > &)" (?sendMessage@myTcpSocket@@QAEHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
mySocket.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "private: int __thiscall myTcpSocket::XPrecieveMessage(class std::basic_string,class std::allocator > &)" (?XPrecieveMessage@myTcpSocket@@AAEHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Debug\CS_Client.exe : fatal error LNK1120: 21 unresolved externals
Results Build log was saved at "file://c:\Source\singleServerMultipleClient_Src_2\singleServerMultipleClientSrc\client\CS_Client\CS_Client\Debug\BuildLog.htm"
CS_Client - 25 error(s), 61 warning(s)
|
|
|
|
|
Mike,
Hope you are doing well now! man, a tough year for everyone.
Anyway, if you can, please use Visual C++ 6.0, that is the one I used when doing this project.
for your problem, first make sure the following (I am assuming you are using visual studio 6.0) and I am assuming you built a project for your client (and certainly for your server too): at the menu bar, find the menu item "project", click it, goto "properties", in the popup box, on the leftside select the Linker folder then select Input. on the right side, select the top textbox "additional dependencies" and type in "ws2_32.lib".
If you still have the link problem, for example, the it complains that a function foo() cannot be found, then first you need to know which file (.cpp file) contains foo()? for example, foo.cpp contains foo(), then, you need to make sure foo.cpp IS included in your project.
HTH,
liyang
|
|
|
|
|
Just one more pooint of clarification.
I am using the free MS VC++ compiler that does not have any of the .Net type support. It is command line only.
I did create a Bloodshed compile environment and created a project and was able to get further utill I received the error below. The "clientInfo" did not resolve in MySocket.cpp.
BTW thius is a different download and has all the files including winserver.cpp in the same folder.
// Get the host name given the address
char *sAddress = inet_ntoa((struct in_addr)clientAddress.sin_addr);
myHostInfo clientInfo(string(sAddress),ADDRESS);
char* hostName = clientInfo.getHostName();
clientHost += string(hostName);
1076 C:\Compile\CSProject\mySocket.cpp no matching function for call to `myHostInfo::myHostInfo(std::string, hostType)'
Thanks again. I agree this should not be this hard.
|
|
|
|
|
no matter the socket is in blocking/non-blocking mode, partial receive happens,
for example when you do recv for the header which is 6 bytes, you might get 2 bytes and need other read to get it all. the code does not handle it.
|
|
|
|
|