Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: Felipe_Maia on January 07, 2014, 12:36:26 pm

Title: Problem to use MySQL 6.1 C Connector with C::B
Post by: Felipe_Maia on January 07, 2014, 12:36:26 pm

  hello,


  I try make a connection with MySql DB , but when i try run this::

Code: [Select]

#include <stdio.h>
#include <stdlib.h>
#include <mysql.h>
#include <my_global.h>

int main()
{
    printf("My SQL Cliet Version:: %s\n", mysql_get_client_info());
    return 0;
}


Link Libraries::

mysqlclient.lib
libmysql.lib

Other linker options
`mysql_config --libs`

Serach Directories - >Compiler

\MySQL\MySQL Connector C 6.1\include
\Microsoft Platform SDK\Include\crt

Compiler Settings - > Other Options

`mysql_config --cflags`


When i compile withou Microsoft SDK  , i get a error "crtdbg.h no such File or Directory" , after that i install and link the reference , but after that i start to get a error when i compile, is a error in  stdlib.h  " expected  ',' or ';' before '__abs64'.


thanks..
Title: Re: Problem to use MySQL 6.1 C Connector with C::B
Post by: BlueHazzard on January 07, 2014, 07:06:43 pm
1) This is not a C::B related question
2) To direct you: http://stackoverflow.com/a/3041260
greetings