0

I'm trying to add the mysqlclient lib to my project. During compilation i get the errors:

libs/sqlapi/lib/libmysqlclient.so: undefined reference to `X509_check_ip_asc'
libs/sqlapi/lib/libmysqlclient.so: undefined reference to `X509_check_host'
collect2: error: ld returned 1 exit status

I'm working on a Debian 8 machine and I'm aware, that the X509 functionality was added in OpenSSL1.0.2 and Debian8 only provides OpenSSL1.0.1. Because of that I manually installed openssl 1.0.2s. But I'm not sure if everything went smoothly there. Since the code does compile on my Linux Mint with OpenSSL 1.0.2 I'm pretty sure there is nothing wrong with the code itself.

Could you hand me any advise how to narrow down the error?

Thanks in advance!

Da_Rudi
  • 1
  • 4

1 Answers1

0

Ok I managed to solve the problem. Be sure that you will give the correct path of the library to the linker with the -L Flag.

So I added

-L/usr/local/ssl/lib -lssl -lcrypto

I guess I was still compiling with the old 1.0.1t version of OpenSSL before.

Da_Rudi
  • 1
  • 4