Click here to Skip to main content
15,033,917 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SetSystemTime - GMT and BST Pin
David Crow23-Jul-07 2:45
MemberDavid Crow23-Jul-07 2:45 
GeneralRe: SetSystemTime - GMT and BST Pin
Mark Salsbery23-Jul-07 5:56
MemberMark Salsbery23-Jul-07 5:56 
QuestionCount threads associated with a process Pin
Programm3r22-Jul-07 23:08
MemberProgramm3r22-Jul-07 23:08 
AnswerRe: Count threads associated with a process Pin
Richard Andrew x6422-Jul-07 23:48
professionalRichard Andrew x6422-Jul-07 23:48 
GeneralRe: Count threads associated with a process Pin
Programm3r23-Jul-07 0:17
MemberProgramm3r23-Jul-07 0:17 
AnswerRe: Count threads associated with a process Pin
Nibu babu thomas23-Jul-07 0:31
MemberNibu babu thomas23-Jul-07 0:31 
GeneralRe: Count threads associated with a process Pin
Programm3r23-Jul-07 0:47
MemberProgramm3r23-Jul-07 0:47 
QuestionError when Building the code Pin
maglev_tgv22-Jul-07 22:16
Membermaglev_tgv22-Jul-07 22:16 
Hello.
I'm new in Socket Programming and I found that the sample program in this page is easy to understand.
Attached sample project is working fine in Microsoft Visual C++ Express Edition.

But I had a problem when trying to make an exact copy of the program,
by creating new empty project and add the sources ( attached "sock.h", "sock.cpp", and "main.cpp" ) to the project.
When I trying to build the project, there's some errors as below.

1>Compiling...
1>main.cpp
1>sock.cpp
1>Generating Code...
1>Linking...
1>sock.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "public: static void __cdecl openutils::CWinSock::Initialize(void)" (?Initialize@CWinSock@openutils@@SAXXZ)
1>sock.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: static void __cdecl openutils::CWinSock::Finalize(void)" (?Finalize@CWinSock@openutils@@SAXXZ)
1>sock.obj : error LNK2019: unresolved external symbol _closesocket@4 referenced in function "public: void __thiscall openutils::CServerSocket::Close(void)" (?Close@CServerSocket@openutils@@QAEXXZ)
1>sock.obj : error LNK2019: unresolved external symbol _htons@4 referenced in function "private: void __thiscall openutils::CServerSocket::Init(void)" (?Init@CServerSocket@openutils@@AAEXXZ)
1>sock.obj : error LNK2019: unresolved external symbol _inet_ntoa@4 referenced in function "public: char const * __thiscall openutils::CSocketAddress::GetIP(void)" (?GetIP@CSocketAddress@openutils@@QAEPBDXZ)
1>sock.obj : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function "public: char const * __thiscall openutils::CSocketAddress::GetName(void)" (?GetName@CSocketAddress@openutils@@QAEPBDXZ)
1>sock.obj : error LNK2019: unresolved external symbol _connect@12 referenced in function "public: void __thiscall openutils::CSocket::Connect(char const *,int)" (?Connect@CSocket@openutils@@QAEXPBDH@Z)
1>sock.obj : error LNK2019: unresolved external symbol _socket@12 referenced in function "public: void __thiscall openutils::CSocket::Connect(char const *,int)" (?Connect@CSocket@openutils@@QAEXPBDH@Z)
1>sock.obj : error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced in function "public: void __thiscall openutils::CSocket::Connect(char const *,int)" (?Connect@CSocket@openutils@@QAEXPBDH@Z)
1>sock.obj : error LNK2019: unresolved external symbol _send@16 referenced in function "public: int __thiscall openutils::CSocket::Send(char const *)" (?Send@CSocket@openutils@@QAEHPBD@Z)
1>sock.obj : error LNK2019: unresolved external symbol _recv@16 referenced in function "public: int __thiscall openutils::CSocket::Read(char *,int)" (?Read@CSocket@openutils@@QAEHPADH@Z)
1>sock.obj : error LNK2019: unresolved external symbol _accept@12 referenced in function "public: class openutils::CSocket * __thiscall openutils::CServerSocket::Accept(void)" (?Accept@CServerSocket@openutils@@QAEPAVCSocket@2@XZ)
1>sock.obj : error LNK2019: unresolved external symbol _listen@8 referenced in function "public: class openutils::CSocket * __thiscall openutils::CServerSocket::Accept(void)" (?Accept@CServerSocket@openutils@@QAEPAVCSocket@2@XZ)
1>sock.obj : error LNK2019: unresolved external symbol _bind@12 referenced in function "public: class openutils::CSocket * __thiscall openutils::CServerSocket::Accept(void)" (?Accept@CServerSocket@openutils@@QAEPAVCSocket@2@XZ)


I suppose that the errors came from different "Project Properties".
Anybody could help me?

I using Microsoft Visual C++ Express Edition 2005 with Microsoft Platform SDK for Windows Server 2003 R2 installed.
AnswerRe: Error when Building the code Pin
Cedric Moonen22-Jul-07 23:01
MemberCedric Moonen22-Jul-07 23:01 
AnswerRe: Error when Building the code Pin
CPallini22-Jul-07 23:15
mveCPallini22-Jul-07 23:15 
GeneralRe: Error when Building the code Pin
maglev_tgv23-Jul-07 0:53
Membermaglev_tgv23-Jul-07 0:53 
GeneralRe: Error when Building the code Pin
Cedric Moonen23-Jul-07 1:14
MemberCedric Moonen23-Jul-07 1:14 
QuestionRe: Error when Building the code Pin
maglev_tgv30-Jul-07 15:53
Membermaglev_tgv30-Jul-07 15:53 
Question%*s Pin
subramanyeswari22-Jul-07 21:43
Membersubramanyeswari22-Jul-07 21:43 
AnswerRe: %*s Pin
DevMentor.org22-Jul-07 22:15
MemberDevMentor.org22-Jul-07 22:15 
GeneralRe: %*s Pin
Roger Broomfield22-Jul-07 23:38
MemberRoger Broomfield22-Jul-07 23:38 
GeneralRe: %*s Pin
DevMentor.org23-Jul-07 6:17
MemberDevMentor.org23-Jul-07 6:17 
AnswerRe: %*s Pin
James R. Twine23-Jul-07 2:35
MemberJames R. Twine23-Jul-07 2:35 
QuestionQuestion about ActiveX control. Pin
eraccn22-Jul-07 21:40
Membereraccn22-Jul-07 21:40 
AnswerRe: Question about ActiveX control. Pin
Stephen Hewitt22-Jul-07 22:09
MemberStephen Hewitt22-Jul-07 22:09 
GeneralRe: Question about ActiveX control. Pin
eraccn22-Jul-07 23:08
Membereraccn22-Jul-07 23:08 
Questionstl files Pin
saisp22-Jul-07 21:13
Membersaisp22-Jul-07 21:13 
AnswerRe: stl files Pin
Maximilien23-Jul-07 0:48
MemberMaximilien23-Jul-07 0:48 
QuestionFreeing ITEMIDLIST..... Pin
Abhijeet Pathak22-Jul-07 20:57
MemberAbhijeet Pathak22-Jul-07 20:57 
AnswerRe: Freeing ITEMIDLIST..... Pin
DevMentor.org23-Jul-07 11:53
MemberDevMentor.org23-Jul-07 11:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.