From: Tomek Walkuski <tomek.walkuski@gmail.com>
Subject: Ada and MySQL (mysql_library_init)
Date: Sat, 5 Dec 2009 14:41:59 -0800 (PST)
Date: 2009-12-05T14:41:59-08:00 [thread overview]
Message-ID: <b13c9754-3c9f-4364-b4d0-9dfc0206c996@j35g2000vbl.googlegroups.com> (raw)
Hi,
when interacting with MySQL database I should invoke mysql_library_init
() function first. GNADE does not have it implemented so I tried to do
this on my own:
function mysql_library_init (
argc : int;
argv : chars_ptr;
groups : chars_ptr
) return int;
pragma Import (C, mysql_library_init, "mysql_library_init");
used as:
... := mysql_library_init (0, Null_Ptr, Null_Ptr);
I build my program with -I/usr/include/mysql -L/usr/lib64/mysql -
lmysqlcient and get:
undefined reference to `mysql_library_init'
collect2: ld returned 1 exit status
gnatlink: error when calling /usr/bin/gcc
gnatmake: *** link failed.
I tested my build setting with mysql_init() and mysql_close() and it
is fine, I cannot get mysql_library_init() and mysql_library_end
working.
Simple C application with these functions works.
Any ideas?
next reply other threads:[~2009-12-05 22:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-05 22:41 Tomek Walkuski [this message]
2009-12-05 23:03 ` Ada and MySQL (mysql_library_init) Maciej Sobczak
2009-12-06 13:06 ` Tomek Walkuski
2009-12-06 20:49 ` Maciej Sobczak
2009-12-06 21:13 ` Tomek Walkuski
2009-12-06 15:59 ` Stephen Leake
2009-12-06 16:52 ` Tomek Walkuski
2009-12-07 6:55 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox