#include
#include
int main(int argc, char **argv)
{
printf(\"MySQL client version: %s\\n\", mysql_get_client_info());
}
For uses of Netbeans on Linux
Open you make file (MakeFile) and add the following lines
# These are the flags that gcc requires in order to link correctly against our installed
# client packages
MYSQL_LIBS := $(shell mysql_config --libs)
right below the Environment block.
Then right click on your project node , select Properties, Build and add $(MYSQL_LIBS)
to the Additional options parameter.