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

Build error and potential fix on Mac OS #20

Open cyertai opened 2 years ago

cyertai commented 2 years ago

The following build error is encountered on MacOS:

TwsApiC++/Src/TwsApiL0.cpp:462:31: error: non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list [-Wc++11-narrowing]
                struct timeval timeout = {0,waitfor};   // wait for some milli/micro seconds

This can be fixed by adding a cast in 462: struct timeval timeout = {0,(int)waitfor}; but I am new to your library and do not know if this would result in incorrect behavior.

AntoineDubois commented 1 year ago

It seems working with MacOS. Did you encountered any error?