cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: building with MSVC

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Mon, 23 Feb 2004 20:44:21 +0100

"David Byron" <DByron_at_everdreamcorp.com> said:

> I'm hoping the patches for #1-#3 are OK. Not sure what the right way to fix
> #4 is. I've seen discussion of this on the list and it seems like the move
> to a common directory for libcurl and curl.exe is the solution.
>
> I have a feeling Daniel is in the middle of doing this right now. Is there
> anything I can do to help?
>
> I tried adding ../lib to the include path when compiling in src, but that
> didn't work:

That should work.
 
> cl.exe /MD /O2 /D "NDEBUG" /I "../lib" /I "../include" /I
> "c:\src\cobra\
> zlib" /nologo /W3 /GX /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
> homedir.c
> homedir.c
> cl.exe /MD /O2 /D "NDEBUG" /I "../lib" /I "../include" /I
> "c:\src\cobra\
> zlib" /nologo /W3 /GX /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c main.c
> main.c
> ../lib\config-win32.h(35) : warning C4005: 'SIZEOF_CURL_OFF_T' : macro
> redefinit
> ion
> setup.h(116) : see previous definition of 'SIZEOF_CURL_OFF_T'
> C:\PROGRA~1\MIAF9D~1\VC98\INCLUDE\winsock2.h(99) : error C2011: 'fd_set' :
> 'struct' type redefinition

I described this a few days ago. It's because include both <winsock.h>
and <winsock2.h> are included. We should only use <winsock2.h> IMHO.
That doesn't mean libcurl programs must have Winsock 2 at runtime (that
is determined by the value in WSAStartup().

So OTOH src/main.c and include/curl/multi.h needs to be patched.

--gv
Received on 2004-02-23