JulyIghor / QtBitcoinTrader

Secure multi crypto exchange trading client
https://sourceforge.net/projects/bitcointrader/
730 stars 374 forks source link

is that a bug? "exchange_indacoin.cpp:638: error: ‘EC_KEY’ was not declared in this scope" #162

Closed PatrickPeter closed 9 years ago

PatrickPeter commented 9 years ago

I clone the latest version and compile the code, but some errors are thrown as below:

exchange_indacoin.cpp:34:27: error: openssl/ecdsa.h: No such file or directory
exchange_indacoin.cpp: In member function ‘QByteArray Exchange_Indacoin::ecdsaSha1(QByteArray, QByteArray&)’:
exchange_indacoin.cpp:638: error: ‘EC_KEY’ was not declared in this scope
exchange_indacoin.cpp:638: error: ‘eckey’ was not declared in this scope
exchange_indacoin.cpp:638: error: ‘EC_KEY_new_by_curve_name’ was not declared in this scope
exchange_indacoin.cpp:639: error: ‘EC_KEY_generate_key’ was not declared in this scope
exchange_indacoin.cpp:643: error: ‘EC_KEY_set_private_key’ was not declared in this scope
exchange_indacoin.cpp:645: error: ‘ECDSA_size’ was not declared in this scope
exchange_indacoin.cpp:647: error: ‘ECDSA_sign’ was not declared in this scope
make: *** [.obj/exchange_indacoin.o] Error 1

I want to ignore these errors caused by indacoin, so I clone the older version 20d3fa6ffd8f90e82c5f47752913690049283ae8 at Sep 25, 2014, and just compile the code. To my surprise, it works fine.

JulyIghor commented 9 years ago

Not a bug. You need to link OpenSSL

PatrickPeter commented 9 years ago

Hi man,

Thank you for your reply before. But I don't know which version for openssl should be installed.

At first, my openssl version is "OpenSSL 0.9.8e-fips-rhel5". There's not a file called "ecdsa.h" under the directory 'ssl/include/openssl'.

Second, I installed the latest version (OpenSSL 1.0.1j) openssl, and then I linked the openssl.

but an error was thrown: undefined reference to `EC_KEY_new_by_curve_name'

I found that EC_KEY_new_by_curve_name was defined in "/openssl/ec.h".

so, I just include this file in exchange_indacoin.cpp, unfortunately, the error still exists as above.

2014-12-26 11:43 GMT+08:00 IGHOR notifications@github.com:

Closed #162 https://github.com/JulyIGHOR/QtBitcoinTrader/issues/162.

— Reply to this email directly or view it on GitHub https://github.com/JulyIGHOR/QtBitcoinTrader/issues/162#event-211977030.

JulyIghor commented 9 years ago

Tell me your OS and what you have done to compile Qt Bitcoin Trader. I'll try to reproduce this and make fix.

PatrickPeter commented 9 years ago

I just clone the latest version of QtBitcoinTrader. Then,

cd src/
qmake QtBitcoinTrader_Desktop.pro
make

the older version ( 20d3fa6ffd8f90e82c5f47752913690049283ae8 at Sep 25, 2014) of QtBitcoinTrader was compiled and worked very well.

JulyIghor commented 9 years ago

https://bitcointalk.org/index.php?topic=85228.0