It is best to use #gcc -o test test.c `mysql_config --cflags --libs` other compile commands: #gcc -o test test.c -I/usr/include/mysql -L/usr/lib /mysql -lmysqlclient -lz -lm#gcc -o test test.c -I /usr/include/mysql -L /usr/lib/mysql -l mysqlclient -lz -lm
mysql_config: Get compiled clients The compile option mysql_config provides useful information about compiling the MySQL client and connecting it to MySQL. The following options are supported: --cflags: compiler flags for finding include files and key compilers to use when compiling the libmysqlclient library Flags and definitions.--include: compiler options for finding MySQL include files (note that normally, use "--cflags" instead of this option).--libmysql-libs, --enbedded: and The libraries and options required to connect to the MySQL embedded server. --libs: The libraries and options needed to connect to the MySQL client library. --libs_r: The libraries and options needed to link to the thread-safe MySQL client. --port: The default tcp/ip port number, defined when configuring MySQL.--socket: The default Unix socket file, defined when configuring MySQL. --version: version number and version of the MySQL distribution. Among them, mysql_config is in /usr/bin/mysql_config (this is the default directory after the rpm package is installed). If the source is installed, it is usually in ..../mysql/bin /mysql_config.
When a person is operating under Linux, they may encounter that the file they are doing is accident
DNS (Domain Name System), a distributed database on the Internet that maps domain names and IP addr
Currently, a very serious Bash vulnerability has been exposed on the Internet. It
Worker. Client: The originator of the request, which can be C, PHP, Perl, MySQL UDF, etc. Job: The
Linux shell array creation and use skills
Centos crack password and run level
Taiwan's Linux Education Revolution
Ecmal batch add stores (including partitions and permissions)
Linux source code installation apache+mysql+php5 and several forums installed
Linux file search technology Daquan
Linux system installation Vmware graphic tutorial
Shell awk real-time monitoring network card traffic script (common application 2)
Virtualization bears the brunt: Linux's top ten common uses
About why Linux can be divided into 4 sectors.
Win10 boot black screen can not enter the desktop solution
How to manually block malicious websites? Cleverly modify the hosts file
Windows 7 system video capture when the screen is completely black
Win10 uses WIN+E to open this computer's setup skills
How to correctly solve the error method introduced by Win7 router
Win8 switch Microsoft account prompt oxd0000072a error how to do
Diablo 3 sells moon cakes, as long as 199 dark moon cakes take home
X86 applications are not compatible with ARM versions
Win10 disk 100% occupation how to do
Win8 system to create application shortcuts on the desktop method