3

I've downloaded what I believe is the latest Quickfix from Github. It builds fine as an x86 project, but when I try to build it as an x64 project there's a load of warnings (see below).

I can't imagine I'm the first person to want to build a 64bit version of Quickfix. A lot of the warnings look like they're Windows specific (eg casting the SOCKET to int).

Is there a version of Quickfix out there that builds cleanly as a 64bit library on Windows, or will I need to go in and patch it myself?

FieldMap.cpp(205): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data FileStore.cpp(135): warning C4477: 'fscanf_s' : format string '%lu' requires an argument of type 'unsigned long *', but variadic argument 3 has type 'size_t *' FileStore.cpp(135): note: consider using '%zu' in the format string FileStore.cpp(197): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 3 has type '::size_t' FileStore.cpp(197): note: consider using '%zu' in the format string c:\apps\VS2017Pro\VC\Tools\MSVC\14.10.25017\include\utility(239): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data FileStore.cpp(136): note: see reference to function template instantiation 'std::pair &std::pair::operator =(std::pair &&)' being compiled FileStore.cpp(136): note: see reference to function template instantiation 'std::pair &std::pair::operator =(std::pair &&)' being compiled SocketConnection.cpp(89): warning C4267: '+=': conversion from 'size_t' to 'unsigned int', possible loss of data SocketMonitor.cpp(141): warning C4244: '=': conversion from 'double' to 'long', possible loss of data SocketMonitor.cpp(146): warning C4244: '=': conversion from 'double' to 'long', possible loss of data SocketMonitor.cpp(232): warning C4244: 'initializing': conversion from 'SOCKET' to 'int', possible loss of data SocketMonitor.cpp(271): warning C4244: 'initializing': conversion from 'SOCKET' to 'int', possible loss of data SocketMonitor.cpp(312): warning C4244: 'initializing': conversion from 'SOCKET' to 'int', possible loss of data Utility.cpp(105): warning C4244: 'initializing': conversion from 'SOCKET' to 'int', possible loss of data Utility.cpp(128): warning C4244: 'return': conversion from 'SOCKET' to 'int', possible loss of data Utility.cpp(139): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings C:\Program Files (x86)\Windows Kits\8.1\Include\um\Winsock2.h(1850): note: see declaration of 'inet_addr' Utility.cpp(150): warning C4244: 'return': conversion from 'SOCKET' to 'int', possible loss of data Utility.cpp(155): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data Utility.cpp(276): warning C4309: '=': truncation of constant value Utility.cpp(299): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings C:\Program Files (x86)\Windows Kits\8.1\Include\um\Winsock2.h(1868): note: see declaration of 'inet_ntoa' Utility.cpp(314): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings C:\Program Files (x86)\Windows Kits\8.1\Include\um\Winsock2.h(1850): note: see declaration of 'inet_addr' Utility.cpp(322): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings C:\Program Files (x86)\Windows Kits\8.1\Include\um\Winsock2.h(2238): note: see declaration of 'gethostbyname' Utility.cpp(328): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings C:\Program Files (x86)\Windows Kits\8.1\Include\um\Winsock2.h(1868): note: see declaration of 'inet_ntoa' Utility.cpp(337): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings C:\Program Files (x86)\Windows Kits\8.1\Include\um\Winsock2.h(1868): note: see declaration of 'inet_ntoa' Utility.cpp(399): warning C4244: '=': conversion from 'uintptr_t' to 'FIX::thread_id', possible loss of data Utility.cpp(418): warning C4312: 'type cast': conversion from 'FIX::thread_id' to 'void *' of greater size Utility.cpp(419): warning C4312: 'type cast': conversion from 'FIX::thread_id' to 'HANDLE' of greater size Utility.cpp(428): warning C4312: 'type cast': conversion from 'FIX::thread_id' to 'HANDLE' of greater size Utility.cpp(438): warning C4311: 'type cast': pointer truncation from 'HANDLE' to 'unsigned int' Utility.cpp(438): warning C4302: 'type cast': truncation from 'HANDLE' to 'unsigned int'

df

Sean
  • 60,939
  • 11
  • 97
  • 136
  • I couldn't find much. Can I have a copy when you're done? :-) – rupweb Jul 20 '17 at 09:12
  • Which compiler are you using on Win 64? Visual Studio? I build 64bit QuickFix version 1.2 for FIX version 4.2 (mostly but also the others) on Windows 64 all the time. My compile just now produces one warning about the size_t to int conversion but not the list you have above. My compiler settings for Visual Studio 2013 are : -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -DYY_NO_UNISTD_H /EHsc . Some of these may be irrelevant to QuickFix. – JimmyNJ Jul 23 '17 at 13:15
  • I'm using VS2017. For example, there are errors about the socket return type. – Sean Jul 23 '17 at 14:15
  • Have you tried preprocessor definitions : _CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS ? Also make sure the preprocessor value WIN32 is set. WIN32 does not mean 32bit in this case, it's a commonly used platform switch for Windows desktop and server versions. – JimmyNJ Jul 26 '17 at 23:33
  • ... also the stdafx.h file included with QuickFix C++ defines preprocessor variable WIN32_LEAN_AND_MEAN which disables winsock includes from windows.h , this may fix the socket warnings at least. – JimmyNJ Jul 26 '17 at 23:41
  • @JimmyNJ - the compiler warnings are caused by a socket handle being 64bits wide on Win64. QuickFix uses an int to store it, which is only 32bits wide. – Sean Jul 27 '17 at 10:08

0 Answers0