From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a36a9db79cd4c60d,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!j35g2000vbl.googlegroups.com!not-for-mail From: Tomek Walkuski Newsgroups: comp.lang.ada Subject: Ada and MySQL (mysql_library_init) Date: Sat, 5 Dec 2009 14:41:59 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 83.31.143.248 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1260052919 3403 127.0.0.1 (5 Dec 2009 22:41:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 5 Dec 2009 22:41:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j35g2000vbl.googlegroups.com; posting-host=83.31.143.248; posting-account=Ar5oKAoAAAD4cyp5eTv5CtR88dGtUxxC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; pl-PL; rv:1.9.1.5) Gecko/20091105 Fedora/3.5.5-1.fc12 Firefox/3.5.5,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8318 Date: 2009-12-05T14:41:59-08:00 List-Id: 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?