(mysql.info.gz) Building clients
Info Catalog
(mysql.info.gz) C API problems
(mysql.info.gz) C
(mysql.info.gz) Threaded clients
22.2.14 Building Client Programs
--------------------------------
If you compile MySQL clients that you've written yourself or that you
obtain from a third-party, they must be linked using the `-lmysqlclient
-lz' option on the link command. You may also need to specify a `-L'
option to tell the linker where to find the library. For example, if
the library is installed in `/usr/local/mysql/lib', use
`-L/usr/local/mysql/lib -lmysqlclient -lz' on the link command.
For clients that use MySQL header files, you may need to specify a `-I'
option when you compile them (for example,
`-I/usr/local/mysql/include'), so the compiler can find the header
files.
To make it simpler to compile MySQL programs on Unix, we have provided
the `mysql_config' script for you. `mysql_config' mysql_config.
You can use it to compile a MySQL client as follows:
CFG=/usr/local/mysql/bin/mysql_config
sh -c "gcc -o progname `$CFG --cflags` progname.c `$CFG --libs`"
The `sh -c' is needed to get the shell not to treat the output from
`mysql_config' as one word.
Info Catalog
(mysql.info.gz) C API problems
(mysql.info.gz) C
(mysql.info.gz) Threaded clients
automatically generated byinfo2html