Data types and functions definitions not found when compiling
am 19.06.2003 10:42:48 von Anselme Huber
------=_NextPart_000_008D_01C3364F.8698E830
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I'm trying to use prepared statement for querying a MySQL server through =
the C API. But when I compile my C sources, I'm told that MYSQL_BIND, =
MYSQL_STMT and so on are undeclared, and that mysql_execute, =
mysql_bind_param, etc, are implicitely declared. I took exactly the =
example given in the doc for mysql_execute (section 9.1.7.5) and I =
linked my application to libmysqlclient.so by putting "-llibmysqlclient =
-lz" in my compilation options. And of course I put libmysqlclient.so in =
my LD_LIBRARY_PATH. And I included mysql.h in my application.
I do not understand because this is working for direct queries =
(mysql_init and mysql_query are recognized, MYSQL and MYSQL_RES also).
Are there other includes to do, or other libraries to link ?
Thanks in advance for your quick answer.
Best regards,
____________________________________
Anselme HUBER - Project Engineer=20
Cap Gemini Ernst & Young
Telecom Media & Networks France
Tel : (+33) 04.76.52.62.70
------=_NextPart_000_008D_01C3364F.8698E830--
Re: Data types and functions definitions not found when compiling
am 19.06.2003 14:39:35 von Sinisa Milivojevic
Anselme Huber writes:
> Hello,
>
> I'm trying to use prepared statement for querying a MySQL server through the C API. But when I compile my C sources, I'm told that MYSQL_BIND, MYSQL_STMT and so on are undeclared, and that mysql_execute, mysql_bind_param, etc, are implicitely declared. I took exactly the example given in the doc for mysql_execute (section 9.1.7.5) and I linked my application to libmysqlclient.so by putting "-llibmysqlclient -lz" in my compilation options. And of course I put libmysqlclient.so in my LD_LIBRARY_PATH. And I included mysql.h in my application.
> I do not understand because this is working for direct queries (mysql_init and mysql_query are recognized, MYSQL and MYSQL_RES also).
>
> Are there other includes to do, or other libraries to link ?
>
> Thanks in advance for your quick answer.
>
> Best regards,
> ____________________________________
> Anselme HUBER - Project Engineer
> Cap Gemini Ernst & Young
> Telecom Media & Networks France
> Tel : (+33) 04.76.52.62.70
Hi!
To use prepared statements you have to use 4.1 server, 4.1 includes
and 4.1 client library.
--
Regards,
--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org