Undefined reference to RSA_generate_key in OpenSSL? [duplicate]

微笑、不失礼 提交于 2019-12-02 00:36:21

Change the order in your gcc command.

gcc -I../include/ rsatest.c -L . -lcrypto -lssl

As far as I know linker has a list of undefined symbols. When it processes libcrypto.a and libssl.a it does not have anything in the list of undefined symbols so he just drops the libraries. Then after processing rsatest it has something in its list but it does not look for symbols in already processed libraries.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!