viabtc_exchange_server
viabtc_exchange_server copied to clipboard
I get this error while compiling ,can anybody help me out of this
gcc -g -rdynamic -o marketprice.exe mp_message.o mp_config.o mp_main.o mp_kline.o mp_server.o -L ../utils -lutils -L ../network -lnetwork -Wl,-Bstatic -lev -ljansson -lmpdec -lrdkafka -lz -lssl -lcrypto -lhiredis -lcurl -Wl,-Bdynamic -lm -lpthread -ldl
//usr/local/lib/libcurl.a(libcurl_la-md5.o): In function Curl_md5it': md5.c:(.text+0x22): undefined reference to
MD5_Init'
md5.c:(.text+0x3f): undefined reference to MD5_Update' md5.c:(.text+0x4a): undefined reference to
MD5_Final'
//usr/local/lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x0): undefined reference to MD5_Init' //usr/local/lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x8): undefined reference to
MD5_Update'
//usr/local/lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x10): undefined reference to MD5_Final' //usr/local/lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x20): undefined reference to
MD5_Init'
//usr/local/lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x28): undefined reference to MD5_Update' //usr/local/lib/libcurl.a(libcurl_la-md5.o):(.data.rel.ro+0x30): undefined reference to
MD5_Final'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_sha256sum': openssl.c:(.text+0x11a): undefined reference to
SHA256_Init'
openssl.c:(.text+0x128): undefined reference to SHA256_Update' openssl.c:(.text+0x133): undefined reference to
SHA256_Final'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_md5sum': openssl.c:(.text+0x187): undefined reference to
MD5_Init'
openssl.c:(.text+0x195): undefined reference to MD5_Update' openssl.c:(.text+0x1a0): undefined reference to
MD5_Final'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_engines_list': openssl.c:(.text+0x1d5): undefined reference to
ENGINE_get_first'
openssl.c:(.text+0x1f7): undefined reference to ENGINE_get_next' openssl.c:(.text+0x207): undefined reference to
ENGINE_get_id'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_set_engine': openssl.c:(.text+0x268): undefined reference to
ENGINE_by_id'
openssl.c:(.text+0x285): undefined reference to ENGINE_finish' openssl.c:(.text+0x291): undefined reference to
ENGINE_free'
openssl.c:(.text+0x2a4): undefined reference to ENGINE_init' openssl.c:(.text+0x2dc): undefined reference to
ENGINE_free'
openssl.c:(.text+0x2e1): undefined reference to ERR_get_error' openssl.c:(.text+0x2f1): undefined reference to
ERR_error_string_n'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_close_all': openssl.c:(.text+0x364): undefined reference to
ENGINE_finish'
openssl.c:(.text+0x370): undefined reference to ENGINE_free' //usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function
ossl_recv':
openssl.c:(.text+0x3d3): undefined reference to ERR_clear_error' openssl.c:(.text+0x400): undefined reference to
SSL_read'
openssl.c:(.text+0x44f): undefined reference to SSL_get_error' openssl.c:(.text+0x468): undefined reference to
ERR_get_error'
openssl.c:(.text+0x4f0): undefined reference to ERR_error_string_n' //usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function
ssl_ui_writer':
openssl.c:(.text+0x880): undefined reference to UI_get_string_type' openssl.c:(.text+0x890): undefined reference to
UI_get0_user_data'
openssl.c:(.text+0x89d): undefined reference to UI_get_input_flags' openssl.c:(.text+0x8a6): undefined reference to
UI_OpenSSL'
openssl.c:(.text+0x8ae): undefined reference to UI_method_get_writer' //usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function
ssl_ui_reader':
openssl.c:(.text+0x8de): undefined reference to UI_get_string_type' openssl.c:(.text+0x8ee): undefined reference to
UI_get0_user_data'
openssl.c:(.text+0x8fe): undefined reference to UI_get_input_flags' openssl.c:(.text+0x907): undefined reference to
UI_OpenSSL'
openssl.c:(.text+0x90f): undefined reference to UI_method_get_reader' openssl.c:(.text+0x92a): undefined reference to
UI_set_result'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function pubkey_show': openssl.c:(.text+0x98d): undefined reference to
BN_print'
openssl.c:(.text+0x9a1): undefined reference to BIO_ctrl' openssl.c:(.text+0x9c8): undefined reference to
BIO_ctrl'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_data_pending': openssl.c:(.text+0xa12): undefined reference to
SSL_pending'
openssl.c:(.text+0xa37): undefined reference to SSL_pending' //usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function
Curl_ossl_shutdown':
openssl.c:(.text+0xac8): undefined reference to ERR_clear_error' openssl.c:(.text+0xae5): undefined reference to
SSL_read'
openssl.c:(.text+0xaf7): undefined reference to SSL_get_error' openssl.c:(.text+0xb1f): undefined reference to
ERR_get_error'
openssl.c:(.text+0xb84): undefined reference to SSL_free' openssl.c:(.text+0xbed): undefined reference to
SSL_get_shutdown'
openssl.c:(.text+0xcbc): undefined reference to ERR_error_string_n' openssl.c:(.text+0xcf9): undefined reference to
SSL_shutdown'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_version': openssl.c:(.text+0xe07): undefined reference to
SSLeay'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function ossl_send': openssl.c:(.text+0xf21): undefined reference to
ERR_clear_error'
openssl.c:(.text+0xf4e): undefined reference to SSL_write' openssl.c:(.text+0xf9e): undefined reference to
SSL_get_error'
openssl.c:(.text+0xfbc): undefined reference to ERR_get_error' openssl.c:(.text+0xfe9): undefined reference to
ERR_error_string_n'
//usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function Curl_ossl_cleanup': openssl.c:(.text+0x10f5): undefined reference to
EVP_cleanup'
openssl.c:(.text+0x10fa): undefined reference to ENGINE_cleanup' openssl.c:(.text+0x10ff): undefined reference to
ERR_free_strings'
openssl.c:(.text+0x1106): undefined reference to ERR_remove_thread_state' openssl.c:(.text+0x110b): undefined reference to
CONF_modules_free'
openssl.c:(.text+0x1110): undefined reference to SSL_COMP_free_compression_methods' //usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function
Curl_ossl_set_engine_default':
openssl.c:(.text+0x1160): undefined reference to ENGINE_set_default' openssl.c:(.text+0x1170): undefined reference to
ENGINE_get_id'
openssl.c:(.text+0x1199): undefined reference to ENGINE_get_id' //usr/local/lib/libcurl.a(libcurl_la-openssl.o): In function
ossl_close.isra.2':
openssl.c:(.text+0x11d1): undefined reference to `SSL_shutdown'
Change your configuration to
”gcc -g -rdynamic -o marketprice.exe mp_message.o mp_config.o mp_main.o mp_kline.o mp_server.o -L ../utils -lutils -L ../network -lnetwork -Wl,-Bstatic -lev -ljansson -lmpdec -lrdkafka -lz -lssl -lcrypto -lhiredis -Wl,-Bdynamic -lcurl -lm -lpthread -ldl“
Add -lcurl
at the end of the compile command.
if you still have any trouble, feel free to write me in telegram: @lspidh
You just changed the place at which you place -lcurl ? Why does this have any matter with the compilation ? @AddBean Were you able to resolve the issue ? @PoeticBear @skys215 I get somewhat the same error, with a lot of undefined references, no matter where I place the -lcurl. I think it may be reated to the fact that gcc don't link some libraries related to C++, but cannot find the solution at the moment.
My files was removed.
I'm not sure, but I also added some more option while compiling, like -lrd+
or something.
But I end up with using this docker image. Compiling this project by your own is such a pain.
@skys215 Can we talk in private on gitter on telegram or else ?
@ilanoh you can pm me in telegram @lspidh, i will help you
@AddBean detailed compilation guide: https://www.felix021.com/blog/read.php?2187
I have run it on Centos successfully, Please see https://github.com/lealife/viabtc_exchange_server/issues/1
@lealife thanks I will check this out this weekend, were you able to play with the API as well?
I am getting the same above error. I am building libcurl for android. I have linked the crypto,openssl and curl library. Below are the libraries linking. libssl.a libcrypto.a libcurl.a I am compiling on Mac OS. Not getting what to do next.