comp.lang.ada
 help / color / mirror / Atom feed
* Ada and MySQL (mysql_library_init)
@ 2009-12-05 22:41 Tomek Walkuski
  2009-12-05 23:03 ` Maciej Sobczak
  2009-12-06 15:59 ` Stephen Leake
  0 siblings, 2 replies; 8+ messages in thread
From: Tomek Walkuski @ 2009-12-05 22:41 UTC (permalink / 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?




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-07  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-05 22:41 Ada and MySQL (mysql_library_init) Tomek Walkuski
2009-12-05 23:03 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox