dmikushin / binance-cxx-api

Binance Bincoin Exchange C++ API
MIT License
66 stars 42 forks source link

mbedcrypto error not built by this project #11

Closed HugoKooijman closed 4 years ago

HugoKooijman commented 4 years ago

Hello,

When following the installation instructions of this library, executing the cmd "cmake .." in the build directory causes the following error:

CMake Error at CMakeLists.txt:31 (target_link_libraries): Cannot specify link libraries for target "mbedcrypto::mbedcrypto" which is not built by this project.

Do I need to install mbedcrypto separately, and if so wich one? Because there are multiple mbedcrypto git repos. (Thank you for your time)

dmikushin commented 4 years ago

Hi, which OS is that?

HugoKooijman commented 4 years ago

lsb_release -a result:

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic

amir963 commented 4 years ago

I had the same problem with ubuntu 18.04.4. you should upgrade cmake to solve the problem

dmikushin commented 4 years ago

I've just tested the following:

dmikushin@hyperthon:~/binance-cxx-api/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:   bionic

Top commit is 469d60ba678074f663415f3f3b9c07051943c86a CMake version is 3.16.5

CMake configure is successful.

dmikushin commented 4 years ago

Thanks @amir963 Indeed, CMake version can really make the difference. @HugoKooijman you can get the latest CMake for Ubuntu from their official repository: https://apt.kitware.com/

I will try to figure out the actual minimum CMake version requirement and will add it to the project.

dmikushin commented 4 years ago

According to releases atop of https://gitlab.kitware.com/cmake/cmake/-/commit/8ffc1c3d89a5562d40a5bd86c457a3173a1469d0 , the proper version requirement is CMake 3.10. I've enforced this requirement for us in bc5a37bb72c3e653d7272613fba3b8331f911aaf

HugoKooijman commented 4 years ago

I updated my CMake and that did indeed fix this particular error, thank you.

amir963 commented 4 years ago

@dmikushin the default cmake version of ubuntu 18.04 is 3.10.2 https://packages.ubuntu.com/search?keywords=cmake&searchon=names&suite=bionic&section=all so 3.10 for the minimum version is not enough on the other hand the cod can be compiled on ubuntu 19.10 with cmake version 3.13.4 without any problem. hence the correct version is somthing between 3.10.2 and 3.13.4

dmikushin commented 4 years ago

@amir963 Corrected as you adviced, thanks!