c++ - Undefined reference with a correctly linked library -


i'm having weird problem mbedtls security library. i've downloaded newest version of (link download .tar.gz) on ubuntu machine, compiled , copied header files /usr/include , shared library files /usr/lib.

when i'm compiling c++ program calls function mbedtls_cipher_cmac_starts mbedtls/cmac.h, undefined reference error security.cpp:599: undefined reference 'mbedtls_cipher_cmac_starts'. however, have included , linked libraries correctly (at least think so, not ordering problem, right?). problem seems in mbedtls library itself, when nm -d libmbedcrypto.so, can't find needed function. checked libmbedtls.so no luck there.

0000000000020206 t mbedtls_cipher_auth_decrypt 0000000000020128 t mbedtls_cipher_auth_encrypt 000000000001ff17 t mbedtls_cipher_check_tag 0000000000020022 t mbedtls_cipher_crypt 0000000000264960 d mbedtls_cipher_definitions 000000000001fb49 t mbedtls_cipher_finish 

although seems in library makefile when compiling library. also, weird header file (cmac.h) can referenced code, won't compile because of undefined references.

which config.h did use when building (have @ configs/ folder)? make sure mbedtls_cmac_c defined when building mbedtls, default 1 not define (as of date of posting).


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -