0

Cannot find -libmysql or undefinder reference with -mysqllib

Hi I have a problem with a regular connection to the database using the code blocks. If Include -libmysql -Cannot find, and if -mysqllib - undefinder reference. I also added a folder lib and include in their places, please help.

#include <iostream>
#include <windows.h>
#include "mysql.h"

using namespace std;

int main()
{
  MYSQL mysql;
  mysql_init(&mysql);
  if( mysql_real_connect(&mysql,//example//))
    cout<<"good job";
  else cout<<"bad job";
  return 0;
}

enter image description here

Mihriban Minaz
  • 3,043
  • 2
  • 32
  • 52
xodoss
  • 1

1 Answers1

0

Most likely you are giving incorrect location of the libraries. Please check whether the folder indeed contains the library.

p12
  • 1,161
  • 8
  • 23