JanBoonen / TwsApiCpp

Improved TWS API POSIX C++ library for the Interactive Brokers (IB) TWS (same project as TwsApiC++ in Yahoo TWSAPI).
106 stars 56 forks source link

compiling library warnings #17

Open Pier-Gnome opened 4 years ago

Pier-Gnome commented 4 years ago

I get the following warning message when building TwsApi.lib: 1>------ Rebuild All started: Project: TwsApi, Configuration: Release Win32 ------ 1>TwsApiL0.cpp 1>d:\twsapicpp\source\posixclient\src\eposixclientsocketplatform.h(14): warning C4005: 'EISCONN': macro redefinition 1>c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\errno.h(98): note: see previous definition of 'EISCONN' And similar messages for 'EWOULDBLOCK' and 'ECONNREFUSED'.

So I see the 3 #defines in 'eposixclientsocketplatform.h' mimic what's commented out in winsock.h and WinSock2.h which makes me want to ignore them. My main concern is that I was not forewarned of these warnings. Any thoughts?

I also get: 1>d:\twsapicpp\source\posixclient\src\eposixclientsocket.cpp(61): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings 1>c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1831): note: see declaration of 'inet_addr'

but which doesn't worry me much.

For what it's worth here is my compiler command line: /GS /analyze- /W3 /Gy /Zc:wchar_t /I"..\Src" /I"..\Api" /I"....\source\PosixClient\Shared" /I"....\source\PosixClient\src" /Zi /Gm- /O2 /Ob2 /Fd".\Release/" /Zc:inline /fp:precise /D "WIN32" /D "_CRT_SECURE_NO_WARNINGS" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /errorReport:prompt /GF /WX- /Zc:forScope /Gd /Oy- /MT /FC /Fa".\Release/" /EHsc /nologo /Fo".\Release/" /Fp".\Release/TwsApi.pch" /diagnostics:classic

Thanks