niXman / binapi

Binance API C++ implementation
Apache License 2.0
253 stars 85 forks source link

Build error subscribe_userdata #10

Closed joleeee closed 3 years ago

joleeee commented 3 years ago
git clone https://github.com/niXman/binapi.git && cd binapi && mkdir build && cd build && cmake .. && make

gives the following output:

Cloning into 'binapi'...
remote: Enumerating objects: 277, done.
remote: Counting objects: 100% (277/277), done.
remote: Compressing objects: 100% (187/187), done.
remote: Total 277 (delta 170), reused 170 (delta 77), pack-reused 0
Receiving objects: 100% (277/277), 125.12 KiB | 753.00 KiB/s, done.
Resolving deltas: 100% (170/170), done.
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/elv/src/binapi/build
Scanning dependencies of target binapi
[ 11%] Building CXX object CMakeFiles/binapi.dir/main.cpp.o
/home/elv/src/binapi/main.cpp: In function ‘int main(int, char**)’:
/home/elv/src/binapi/main.cpp:198:33: error: ‘struct binapi::ws::websockets_pool’ has no member named ‘subscribe_userdata’
  198 |     auto user_data_stream = wsp.subscribe_userdata(start_uds.v.listenKey.c_str(),
      |                                 ^~~~~~~~~~~~~~~~~~
/home/elv/src/binapi/main.cpp:218:9: error: ‘struct binapi::ws::websockets_pool’ has no member named ‘subscribe_depth’
  218 |     wsp.subscribe_depth(testpair,
      |         ^~~~~~~~~~~~~~~
/home/elv/src/binapi/main.cpp:229:9: error: ‘struct binapi::ws::websockets_pool’ has no member named ‘subscribe_trade’
  229 |     wsp.subscribe_trade(testpair,
      |         ^~~~~~~~~~~~~~~
/home/elv/src/binapi/main.cpp: In lambda function:
/home/elv/src/binapi/main.cpp:247:17: error: ‘struct binapi::ws::websockets_pool’ has no member named ‘unsubscribe_userdata’; did you mean ‘unsubscribe_all’?
  247 |             wsp.unsubscribe_userdata(user_data_stream);
      |                 ^~~~~~~~~~~~~~~~~~~~
      |                 unsubscribe_all
/home/elv/src/binapi/main.cpp:247:38: error: ‘user_data_stream’ is not captured
  247 |             wsp.unsubscribe_userdata(user_data_stream);
      |                                      ^~~~~~~~~~~~~~~~
/home/elv/src/binapi/main.cpp:244:32: note: the lambda has no capture-default
  244 |         [user_data_stream, &wsp]
      |                                ^
/home/elv/src/binapi/main.cpp:198:10: note: ‘<typeprefixerror>user_data_stream’ declared here
  198 |     auto user_data_stream = wsp.subscribe_userdata(start_uds.v.listenKey.c_str(),
      |          ^~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/binapi.dir/build.make:82: CMakeFiles/binapi.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/binapi.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
niXman commented 3 years ago

fixed by #11

closed.