Hi, I’m trying to compile simple C++ program for Raspberry PI using cross-compiler method. I’ve done everything in the tutorial http://visualgdb.com/tutorials/raspberry/wiringPi/ and managed to run sample blinking led application, so everything seems to be configured ok.
Now I want to add some mysql support to log changes and read some config info.
#include
#include <mysql/mysql.h>
int main(int argc, char *argv[])
{
wiringPiSetup();
MYSQL *mysql1 = mysql_init(NULL);
}
Unfortunatelly, I get en error:
‘NULL’ was not declared in this scope
I tried to include
#include <mysql/my_global.h>
so NULL was no longer undeclared, but another error showed:
error VGDB1000: undefined reference to `mysql_init’
What did I do wrong? Thanks!