www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



c++.windows.32-bits - Winsocket problem

↑ ↓ ← =?iso-8859-1?Q?Robert_M=2E_M=FCnch?= <robert.muench robertmuench.de> writes:
Hi, I get the following error log while compiling some code.


dmc -c -e -o+all -I. -I..\..\libaxl\src vortex
     SOCKET s,
            ^
c:\dm\bin\..\include\win32\MSWSOCK.H(69) : Error: ')' expected to close  
function parameter list with
     char
        ^
c:\dm\bin\..\include\win32\MSWSOCK.H(70) : Error: '=', ';' or ',' expected
      SOCKET hSocket,
                    ^
c:\dm\bin\..\include\win32\MSWSOCK.H(89) : Error: ')' expected to close  
function parameter list with
      HANDLE hFile,
                  ^
c:\dm\bin\..\include\win32\MSWSOCK.H(90) : Error: 'HANDLE' previously  
declared as something else
It was declared as: void *
It is now declared: int
      SOCKET sListenSocket,
                          ^
c:\dm\bin\..\include\win32\MSWSOCK.H(101) : Error: ')' expected to close  
function parameter list with
Fatal error: too many errors
--- errorlevel 1


I really don't understand why I get an error message inside a DMC header  
file. Can someone give me a tipp what the problem might be?

-- 
Robert M. Münch
Management & IT Freelancer
http://www.robertmuench.de
Mar 08 2008
↑ ↓ → =?iso-8859-1?Q?Robert_M=2E_M=FCnch?= <robert.muench robertmuench.de> writes:
On Sat, 08 Mar 2008 15:39:49 +0100, Robert M. Münch  
<robert.muench robertmuench.de> wrote:

 Hi, I get the following error log while compiling some code.
 ...

Hi, OK I got it. This happens if: you include WINSOCK2.H before (or instead of) WINDOWS.H Because WISOCK2.H includes WINDOWS.H, which in turn inlcudes WINSOCK2.H and so on and gives a compile error like below in MSWSOCK.H because of unreferenced symbols. I hope others might help this posting. -- Robert M. Münch Management & IT Freelancer http://www.robertmuench.de
Mar 08 2008