0
我下載了Microsoft平臺SDK。我試圖建立下無法構建LSP示例
C中的示例項目LSP:\ Program Files文件\ Microsoft平臺 SDK \的Samples \ NetDS \的WinSock \ LSP
我得到了以下鏈接錯誤:
asyncselect.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * gDllInstance" ([email protected]@[email protected]@A)
asyncselect.obj : error LNK2001: unresolved external symbol "void * gAddContextEvent" ([email protected]@3PAXA)
sockinfo.obj : error LNK2001: unresolved external symbol "void * gAddContextEvent" ([email protected]@3PAXA)
extension.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __stdcall ExtTransmitFile(unsigned int,void *,unsigned long,unsigned long,struct _OVERLAPPED *,struct _TRANSMIT_FILE_BUFFERS *,unsigned long)" ([email protected]@[email protected]@[email protected]@[email protected])
overlap.obj : error LNK2001: unresolved external symbol [email protected]
extension.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __stdcall ExtTransmitFile(unsigned int,void *,unsigned long,unsigned long,struct _OVERLAPPED *,struct _TRANSMIT_FILE_BUFFERS *,unsigned long)" ([email protected]@[email protected]@[email protected]@[email protected])
overlap.obj : error LNK2001: unresolved external symbol [email protected]
instlsp.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
instlsp.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
lspadd.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __cdecl InstallProvider(enum WINSOCK_CATALOG,struct _GUID *,wchar_t *,struct _WSAPROTOCOL_INFOW *,int)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected])
lspadd.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __cdecl InstallIfsLspProtocolChains(enum WINSOCK_CATALOG,struct _GUID *,wchar_t *,wchar_t *,unsigned long *,unsigned long)" ([email protected]@[email protected]@[email protected]@[email protected])
lspmap.obj : error LNK2001: unresolved external symbol [email protected]
prnpinfo.obj : error LNK2001: unresolved external symbol [email protected]
provider.obj : error LNK2001: unresolved external symbol [email protected]
lspadd.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __cdecl InstallIfsLspProtocolChains(enum WINSOCK_CATALOG,struct _GUID *,wchar_t *,wchar_t *,unsigned long *,unsigned long)" ([email protected]@[email protected]@[email protected]@[email protected])
lspadd.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __cdecl WriteProviderOrder(enum WINSOCK_CATALOG,unsigned long *,unsigned long,int *)" ([email protected]@[email protected]@[email protected])
lspdel.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __cdecl DeinstallProvider(enum WINSOCK_CATALOG,struct _GUID *)" ([email protected]@[email protected]@[email protected]@@Z)
overlap.obj : error LNK2001: unresolved external symbol "struct _RTL_CRITICAL_SECTION gOverlappedCS" ([email protected]@[email protected]@A)
overlap.obj : error LNK2019: unresolved external symbol "void __cdecl FreeWSABuf(struct _WSABUF *)" ([email protected]@[email protected]@@Z) referenced in function "void __cdecl FreeOverlappedStructure(struct _WSAOVERLAPPEDPLUS *)" ([email protected]@[email protected]@@Z)
overlap.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "void __stdcall IntermediateCompletionRoutine(unsigned long,unsigned long,struct _OVERLAPPED *,unsigned long)" ([email protected]@[email protected]@[email protected])
overlap.obj : error LNK2019: unresolved external symbol "struct _WSABUF * __cdecl CopyWSABuf(struct _WSABUF *,unsigned long,int *)" ([email protected]@[email protected]@[email protected]@Z) referenced in function "struct _WSAOVERLAPPEDPLUS * __cdecl PrepareOverlappedOperation(struct _SOCK_INFO *,enum LspOperation,struct _WSABUF *,unsigned long,struct _OVERLAPPED *,void (__stdcall*)(unsigned long,unsigned long,struct _OVERLAPPED *,unsigned long),struct _WSATHREADID *,int *)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@P6GXKK3[email protected][email protected]@[email protected])
overlap.obj : error LNK2019: unresolved external symbol "void __cdecl CopyOffset(struct _OVERLAPPED *,struct _OVERLAPPED *)" ([email protected]@[email protected]@[email protected]) referenced in function "struct _WSAOVERLAPPEDPLUS * __cdecl PrepareOverlappedOperation(struct _SOCK_INFO *,enum LspOperation,struct _WSABUF *,unsigned long,struct _OVERLAPPED *,void (__stdcall*)(unsigned long,unsigned long,struct _OVERLAPPED *,unsigned long),struct _WSATHREADID *,int *)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected])
provider.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "struct _WSAPROTOCOL_INFOW * __cdecl EnumerateProviders(enum WINSOCK_CATALOG,int *)" ([email protected]@[email protected]@[email protected]@[email protected])
sockinfo.obj : error LNK2001: unresolved external symbol "struct _PROVIDER * gBaseInfo" ([email protected]@[email protected]@A)
spi.obj : error LNK2019: unresolved external symbol "struct _SOCKET_CONTEXT * __cdecl FindSocketContext(unsigned int,int)" ([email protected]@[email protected]@[email protected]) referenced in function "int __stdcall WSPCloseSocket(unsigned int,int *)" ([email protected]@[email protected])
spi.obj : error LNK2019: unresolved external symbol "void __cdecl FreeSocketContext(struct _PROVIDER *,struct _SOCKET_CONTEXT *)" ([email protected]@[email protected]@[email protected]@@Z) referenced in function "unsigned int __stdcall WSPSocket(int,int,int,struct _WSAPROTOCOL_INFOW *,unsigned int,unsigned long,int *)" ([email protected]@[email protected]@[email protected])
spi.obj : error LNK2019: unresolved external symbol "struct _SOCKET_CONTEXT * __cdecl CreateSocketContext(struct _PROVIDER *,unsigned int,int *)" ([email protected]@[email protected]@[email protected]@[email protected]) referenced in function "unsigned int __stdcall WSPSocket(int,int,int,struct _WSAPROTOCOL_INFOW *,unsigned int,unsigned long,int *)" ([email protected]@[email protected]@[email protected])
spi.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl FindDestinationAddress(struct _SOCKET_CONTEXT *,struct sockaddr const *,int,struct sockaddr * *,int *)" ([email protected]@[email protected]@[email protected]@[email protected]@Z)
spi.obj : error LNK2019: unresolved external symbol "void __cdecl FreeSocketContextList(struct _PROVIDER *)" ([email protected]@[email protected]@@Z) referenced in function "void __cdecl FreeLspProviders(struct _PROVIDER *,int,int *)" ([email protected]@[email protected]@[email protected])
Debug\My_LSP.exe : fatal error LNK1120: 23 unresolved externals
我在Windows XP上使用Visual C++ 2008 Express。我將文件夾include
和lib
包括到創建的項目中。
任何想法或建議?
我已經安裝PSDK,幷包含在我的項目「包括」和「LIB」文件夾。 – Khaled 2010-11-02 08:13:21