There might not be anyone out there who can help support a memcache compile on Vista, but I thought I would make a post before beginning to try and figure out this compile error, and hopfully get some help, and ultimately end up up with some documentation on this mailing list about how to successfully do this compile in future.
FYI, The associated libevent compile went just fine. I am using the existing port for memcached 1.2.6 on Windows created by Brodie Thiesfield, which can be found at: http://www.socialtext.net/memcached/index.cgi?windows My compile is being done on MS Vista Ultimate with Visual Studio 2008 and .NET Framework 3.5. Basically, the memcached-win32.h has different inet_pton declaration than the one on my system in file: c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h (line 583) This newest inet_pton declaration looks like: #if (NTDDI_VERSION >= NTDDI_LONGHORN) WINSOCK_API_LINKAGE INT WSAAPI inet_pton( __in INT Family, __in PCSTR pszAddrString, __out_bcount(sizeof(IN6_ADDR)) PVOID pAddrBuf ); The inet_pton declaration in the memcached win32.h looks like: #define close(s) closesocket(s) inline int inet_pton(int af, register const char *cp, struct in_addr *addr) { if(af != AF_INET) { WSASetLastError(WSAEPFNOSUPPORT); return -1; } return inet_aton(cp, addr); } Just for reference here is the build log, which again is output by Visual Studio Express Edition 2008: Build Log Build started: Project: memcached, Configuration: Debug| Win32 Command Lines Creating temporary file "c:\src\memcached \win32\Debug\RSP0000041831217676.rsp" with contents [ /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /Gm / EHsc /RTC1 /MDd /Fp"Debug/memcached.pch" /Fo"Debug/" /Fd"Debug/" /W3 / c /ZI /TC .\win32.c ..\thread.c ..\stats.c ..\slabs.c .\ntservice.c ..\memcached.c ..\items.c .\bsd_getopt.c ..\assoc.c ] Creating command line "cl.exe @c:\src\memcached\win32\Debug \RSP0000041831217676.rsp /nologo /errorReport:prompt" Output Window Compiling... assoc.c bsd_getopt.c items.c memcached.c c:\program files\microsoft sdks\windows\v6.0a\include \ws2tcpip.h(583) : error C2373: 'inet_pton' : redefinition; different type modifiers c:\src\memcached\win32\win32.h(65) : see declaration of 'inet_pton' ntservice.c slabs.c stats.c thread.c win32.c Generating Code... Results Build log was saved at "file://c:\src\memcached \win32\Debug\BuildLog.htm" memcached - 1 error(s), 0 warning(s) And again just for reference, here are the Warnings associated with converting the Visual Studio 2005 project into Visual Studio 2008 projects. Conversion Issues - memcached.vcproj: Web deployment to the local IIS server is no longer supported. The Web Deployment build tool has been removed from your project settings. Visual C++ now provides improved safety in its C and C++ Libraries. This includes new and improved functions, additional checking and validation, and internal design changes. These libraries are turned on by default. You may see some warnings about unsafe functions or parameters when you build your project. The warnings will generally suggest an alternative safer coding style or function. It is advised that you correct these warnings, in order to make your code more safe. Full details can be found in the documentation by searching for 'Security Enhancements in the CRT' and for 'Checked Iterators'. The C/C++ compiler default settings have been modified to be more compliant with ISO Standard C++. Included in those changes are enforcing Standard C++ for loop scoping and supporting wchar_t as a native type. These changes may cause existing code to no longer compile without changes to the code or the compiler options with which it is built. Project upgraded successfully. Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are now automatically built with the Manifest Tool. You may need to change your build in order for it to work correctly. For instance, it is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"<insert dependency here>")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line may need to be commented out before the project will build correctly. Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address- of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers). This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project. Any help apppreciated... sturdyworks
