Hello,everyone!
I want to use Mysql C API to connect to Mysql server. When I use the
following command :
gcc test.c -o test.bin -I/usr/local/mysql/include -L/usr/local/mysql/lib
-lmysqlclient -lz,
I got the erro information:
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x8):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0xc):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x10):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x14):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(ssl.o)(.gnu.linkonce.d.__vt_Q25yaSSL7Message+0x18):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(cert_wrapper.o)(.text+0x53): In
function `yaSSL::x509::~x509(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(cert_wrapper.o)(.text+0x275): In
function `yaSSL::CertManager::~CertManager(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPQ25yaSSL11SSL_SESSION+0x32):
In function `mySTL::list<yaSSL::SSL_SESSION *>::~list(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPQ25yaSSL12input_buffer+0x32):
In function `mySTL::list<yaSSL::input_buffer *>::~list(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPQ25yaSSL13output_buffer+0x32):
In function `mySTL::list<yaSSL::output_buffer *>::~list(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.t._._Q25mySTLt4list1ZPUc+0x32):
more undefined references to `__builtin_delete' follow
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0x8):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0xc):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0x10):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(template_instnt.o)(.gnu.linkonce.d.__vt_Q25yaSSL13HandShakeBase+0x14):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(yassl_imp.o)(.text+0x23de): In
function `yaSSL::ServerDHParams::~ServerDHParams(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_imp.o)(.text+0x3e8f): In
function `yaSSL::Connection::~Connection(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x29ed): In
function `yaSSL::SSL_SESSION::~SSL_SESSION(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x2a9f): In
function `yaSSL::Sessions::~Sessions(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x2d91): In
function `yaSSL::SSL_CTX::~SSL_CTX(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(yassl_int.o)(.text+0x312c): more
undefined references to `__builtin_delete' follow
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0xc):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x10):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x14):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x18):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt4HASH+0x1c):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-asn.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt11BER_Decoder+0xc):
more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-
asn.o)(.gnu.linkonce.t._._Q28TaoCrypt13DSA_PublicKey+0x9f):
In function `TaoCrypt::DSA_PublicKey::~DSA_PublicKey(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la- random.o)(.text+0xf6):
In function `TaoCrypt::OS_Seed::~OS_Seed(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x14):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x18):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-
hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x1c):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x20):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x24):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-
hash.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt17HASHwithTransform+0x28):
more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.text+0x10ae): In
function `yaSSL::RandomPool::~RandomPool(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.text+0x192e): In
function `yaSSL::Integer::~Integer(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.text+0x1c36): In
function `yaSSL::DiffieHellman::~DiffieHellman(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q35yaSSL3DES7DESImpl+0x26):
In function `yaSSL::DES::DESImpl::~DESImpl(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q35yaSSL3AES7AESImpl+0x71):
In function `yaSSL::AES::AESImpl::~AESImpl(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q35yaSSL3RSA7RSAImpl+0x6e):
more undefined references to `__builtin_delete' follow
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt9Mode_BASE+0xc):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL4Auth+0x8):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL4Auth+0xc):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL4Auth+0x10):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL10BulkCipher+0x8):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.d.__vt_Q25yaSSL10BulkCipher+0xc):
more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(crypto_wrapper.o)(.gnu.linkonce.t._._Q28TaoCrypt14RSA_PrivateKey+0x123):
In function `TaoCrypt::RSA_PrivateKey::~RSA_PrivateKey(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(log.o)(.text+0x20): In function
`yaSSL::Log::~Log(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-
algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0xc):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x10):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x14):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-
algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x18):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x3c):
undefined reference to `__pure_virtual'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x40):
more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la- file.o)(.text+0x64):
In function `TaoCrypt::FileSource::~FileSource(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-file.o)(.text+0x200):
In function `TaoCrypt::FileSink::~FileSink(void)':
: undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status

What is wrong ?
Thanks for any suggestion.

Regard
Guoxian

Reply via email to