This is compiling output:
1>------ Build started: Project: ControlTheRobot, Configuration: Debug
eBox4300_WINCE600_SDK (x86) ------
1>Linking...
1>Executive.obj : error LNK2005: "struct HINSTANCE__ * g_hInst"
(?g_hInst@@3PAUHINSTANCE__@@A) already defined in ControlTheRobot.obj
1>Executive.obj : error LNK2005: "struct HWND__ * g_hWndCommandBar"
(?g_hWndCommandBar@@3PAUHWND__@@A) already defined in ControlTheRobot.obj
1>Executive.obj : error LNK2005: _WinMain already defined in
ControlTheRobot.obj
1>Executive.obj : error LNK2005: "unsigned short __cdecl
MyRegisterClass(struct HINSTANCE__ *,wchar_t *)"
(?MyRegisterClass@@YAGPAUHINSTANCE__@@PA_W@Z) already defined in
ControlTheRobot.obj
1>Executive.obj : error LNK2005: "int __cdecl InitInstance(struct
HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z) already defined
in ControlTheRobot.obj
1>Executive.obj : error LNK2005: "long __cdecl WndProc(struct HWND__
*,unsigned int,unsigned int,long)" (?WndProc@@YAJPAUHWND__@@IIJ@Z) already
defined in ControlTheRobot.obj
1>Executive.obj : error LNK2005: "int __cdecl About(struct HWND__ *,unsigned
int,unsigned int,long)" (?About@@YAHPAUHWND__@@IIJ@Z) already defined in
ControlTheRobot.obj
1>Executive.obj : error LNK2005: "void __cdecl TheTimerProc(struct HWND__
*,unsigned int,unsigned int,unsigned long)"
(?TheTimerProc@@YAXPAUHWND__@@IIK@Z) already defined in ControlTheRobot.obj
1>Connection.obj : error LNK2019: unresolved external symbol _WSACleanup
referenced in function "public: __thiscall CConnection::~CConnection(void)"
(??1CConnection@@QAE@XZ)
1>Connection.obj : error LNK2019: unresolved external symbol _WSAStartup
referenced in function "public: void __thiscall
CConnection::InitChannel(void)" (?InitChannel@CConnection@@QAEXXZ)
1>socklib.obj : error LNK2019: unresolved external symbol _gethostbyname
referenced in function "struct in_addr __cdecl getAddrByName(char *)"
(?getAddrByName@@YA?AUin_addr@@PAD@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _listen referenced
in function "int __cdecl initServer(int,unsigned int *,struct sockaddr_in *)"
(?initServer@@YAHHPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _closesocket
referenced in function "int __cdecl initServer(int,unsigned int *,struct
sockaddr_in *)" (?initServer@@YAHHPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _bind referenced
in function "int __cdecl initServer(int,unsigned int *,struct sockaddr_in *)"
(?initServer@@YAHHPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _htons referenced
in function "int __cdecl initServer(int,unsigned int *,struct sockaddr_in *)"
(?initServer@@YAHHPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _htonl referenced
in function "int __cdecl initServer(int,unsigned int *,struct sockaddr_in *)"
(?initServer@@YAHHPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _socket referenced
in function "int __cdecl initServer(int,unsigned int *,struct sockaddr_in *)"
(?initServer@@YAHHPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _connect
referenced in function "int __cdecl connectToServer(unsigned int *,unsigned
short,struct in_addr)" (?connectToServer@@YAHPAIGUin_addr@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _inet_ntoa
referenced in function "int __cdecl waitForClient(unsigned int,unsigned int
*,struct sockaddr_in *)" (?waitForClient@@YAHIPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _accept referenced
in function "int __cdecl waitForClient(unsigned int,unsigned int *,struct
sockaddr_in *)" (?waitForClient@@YAHIPAIPAUsockaddr_in@@@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _recv referenced
in function "char __cdecl getByte(unsigned int)" (?getByte@@YADI@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _ntohl referenced
in function "int __cdecl receiveBPP(char * *,unsigned int)"
(?receiveBPP@@YAHPAPADI@Z)
1>socklib.obj : error LNK2019: unresolved external symbol _send referenced
in function "int __cdecl transmitBPP(int,char *,unsigned int)"
(?transmitBPP@@YAHHPADI@Z)
1>eBox4300_WINCE600_SDK (x86)\Debug/ControlTheRobot.exe : fatal error
LNK1120: 15 unresolved externals
1>Build log was saved at
"file://c:\WINCE600\OSDesigns\eBoxOS\ControlTheRobot\eBox4300_WINCE600_SDK
(x86)\Debug\BuildLog.htm"
1>ControlTheRobot - 24 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Could you tell me how to recover those errors?
Thanks in advance,
Ahmed
Does the default template generated by the wizard work? If so, undo all the
steps in between and find out what exactly caused your program to break.
> 1>Executive.obj : error LNK2005: "struct HINSTANCE__ * g_hInst"
> (?g_hInst@@3PAUHINSTANCE__@@A) already defined in ControlTheRobot.obj
Without the code (obviously a minimal example only!) it is hard to tell
what's wrong. My guess is that you have definitions of these in a header
file that is included in more than one translation unit.
> Connection.obj : error LNK2019: unresolved external symbol _WSAStartup
> referenced in function
> "public: void __thiscall CConnection::InitChannel(void)"
Go to the documentation for e.g. WSAStartup and read which library you have
to link.
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932