Hi!
On Dec 07, Paul DuBois wrote:
>
> Current example (from third edition):
>
> #include <my_global.h>
> #include <my_sys.h>
> #include <mysql.h>
>
> static const char *client_groups[] = { "client", NULL };
>
> int
> main (int argc, char *argv[])
> {
> int i;
>
> printf ("Original argument vector:\n");
> for (i = 0; i < argc; i++)
> printf ("arg %d: %s\n", i, argv[i]);
>
> MY_INIT (argv[0]);
> load_defaults ("my", client_groups, &argc, &argv);
>
> printf ("Modified argument vector:\n");
> for (i = 0; i < argc; i++)
> printf ("arg %d: %s\n", i, argv[i]);
>
> exit (0);
> }
>
> The header files are different, and it uses MY_INIT() rather
> than my_init(). I seem to be using the same example for the
> (now-in-progress) fourth edition. Is the current code okay?
try to use mysql_library_init() instead of MY_INIT().
And if load_defaults() will be in mysql.h then you won't need my_sys.h
and my_global.h
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Dachauer Str. 37, D-80335 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140