PDA

View Full Version : [JX] Build Common bị lỗi thế này. Giúp mình với !



dammejx
01-09-12, 11:37 AM
Deleting intermediate files and output files for project 'Common - Win32 Release'.
--------------------Configuration: Common - Win32 Release--------------------
Compiling...
stdafx.cpp
Compiling...
Buffer.cpp
Console.cpp
Event.cpp
EventSelect.cpp
Exception.cpp
IniFile.cpp
IOBuffer.cpp
IOCompletionPort.cpp
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(36) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(38) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(42) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(46) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(49) : error C2535: 'unsigned long __thiscall OnlineGameLib::Win32::CIOCompletionPort::GetStatus (void)' : member function already defined or declared
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(42) : see declaration of 'GetStatus'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(27) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(31) : error C2065: 'completionKey' : undeclared identifier
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(38) : error C2065: 'ULONG_PTR' : undeclared identifier
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(38) : error C2146: syntax error : missing ')' before identifier 'completionKey'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(38) : error C2182: 'PostStatus' : illegal use of type 'void'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(38) : error C2350: 'CIOCompletionPort::PostStatus' is not a static member
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(40) : error C2059: syntax error : ')'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(41) : error C2143: syntax error : missing ';' before '{'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(41) : error C2447: missing function header (old-style formal list?)
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(51) : error C2065: 'pCompletionKey' : undeclared identifier
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(52) : error C2275: 'PDWORD' : illegal use of this type as an expression
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windef.h(156) : see declaration of 'PDWORD'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(52) : error C2146: syntax error : missing ')' before identifier 'pdwNumBytes'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(52) : error C2350: 'CIOCompletionPort::GetStatus' is not a static member
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(52) : error C2078: too many initializers
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(52) : error C2275: 'PDWORD' : illegal use of this type as an expression
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windef.h(156) : see declaration of 'PDWORD'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(53) : error C2059: syntax error : ')'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(54) : error C2143: syntax error : missing ';' before '{'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(54) : error C2447: missing function header (old-style formal list?)
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(68) : error C2275: 'PDWORD' : illegal use of this type as an expression
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windef.h(156) : see declaration of 'PDWORD'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(68) : error C2146: syntax error : missing ')' before identifier 'pdwNumBytes'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(68) : error C2350: 'CIOCompletionPort::GetStatus' is not a static member
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(68) : error C2078: too many initializers
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(68) : error C2275: 'PDWORD' : illegal use of this type as an expression
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windef.h(156) : see declaration of 'PDWORD'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(70) : error C2059: syntax error : ')'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(71) : error C2143: syntax error : missing ';' before '{'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.cpp(71) : error C2447: missing function header (old-style formal list?)
KSG_EncodeDecode.cpp
KSocketClient2.cpp
Library.cpp
Macro.cpp
ManualResetEvent.cpp
Mutex.cpp
NodeList.cpp
Socket.cpp
SocketAddress.cpp
SocketClient.cpp
SocketServer.cpp
NOTE : --------------------OnlineGameLib [Client] : Announcement--------------------
NOTE : The lib be used for socket communicate that it is base on
NOTE : Windows 95 and Windows NT 3.51 and later
NOTE :
NOTE : liupeng xishanju.zhuhai.china 2003.1
NOTE : -----------------------------------------------------------------------------
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(36) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(38) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(42) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(46) : error C2061: syntax error : identifier 'ULONG_PTR'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(49) : error C2535: 'unsigned long __thiscall OnlineGameLib::Win32::CIOCompletionPort::GetStatus (void)' : member function already defined or declared
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\IOCompletionPort.h(42) : see declaration of 'GetStatus'
NOTE : --------------------OnlineGame [Server] : Announcement--------------------
NOTE : Developing a truly scalable Winsock Server using IO Completion Ports(IOCP)
NOTE : But this module depend on the microsoft platform
NOTE : Requirements :
NOTE : * Windows NT/2000/XP: Included in Windows NT 4.0 and later.
NOTE : * Windows 95/98/Me: Unsupported.
NOTE :
NOTE : liupeng xishanju.zhuhai.china 2003.1
NOTE : -----------------------------------------------------------------------------
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(348) : error C2065: 'ULONG_PTR' : undeclared identifier
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(348) : error C2146: syntax error : missing ')' before identifier 'pSocket'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(348) : error C2059: syntax error : ')'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(431) : error C2146: syntax error : missing ')' before identifier 'pSocket'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(431) : error C2059: syntax error : ')'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(957) : error C2065: 'PDWORD_PTR' : undeclared identifier
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(957) : error C2297: '&' : illegal, right operand has type 'class OnlineGameLib::Win32::CSocketServer::Socket *'
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(957) : error C2660: 'GetStatus' : function does not take 3 parameters
D:\Source\swrod3\SwordOnline\Sources\MultiServer\C ommon\SocketServer.cpp(1011) : error C2660: 'PostStatus' : function does not take 1 parameters
Thread.cpp
Generating Code...
Compiling...
UsesWinsock.cpp
Utils.cpp
Win32Exception.cpp
Generating Code...
Error executing cl.exe.

Common.lib - 45 error(s), 0 warning(s)





ai biết lỗi gì thì giúp mình. thank

assaa
01-09-12, 11:42 AM
Bạn copy cái VC98 của nhoxyeunhac share rồi build lại xem thế nào

LeHuyetVoHon
01-09-12, 06:47 PM
typedef DWORD ULONG_PTR;


thêm cái trên vào đầu file

kelly
01-09-12, 06:57 PM
cái này chắc chắn bạn build trên win7

trước mình thử win7 cũng bị lỗi này chuyển qua xp sp2 thi ok