vinicius_souza
(usa Ubuntu)
Enviado em 10/12/2012 - 14:43h
Na primeira reposta entrei no link e fui tentar compilar para eu entender e colocar no meu cód.
Compilei esse programa com o Dev C++
#include <stdio.h>
#include <mysql/mysql.h>
#define HOST "localhost"
#define USER "guest"
#define PASS "guest"
#define DB "teste"
int main(void)
{
MYSQL conexao;
MYSQL_RES *resp;
MYSQL_ROW linhas;
MYSQL_FIELD *campos;
char query[]="SELECT * FROM aprendendo;";
int conta; //Contador comum
mysql_init(&conexao);
if (mysql_real_connect(&conexao,HOST,USER,PASS,DB,0,NULL,0))
{
printf("Conectado com Sucesso!\n");
if (mysql_query(&conexao,query))
printf("Erro: %s\n",mysql_error(&conexao));
else
{
resp = mysql_store_result(&conexao);//recebe a consulta
if (resp) //se houver consulta
{
//passa os dados dos campos para a variável campos
//escreve na tela os nomes dos campos dando
//um tab somente
campos = mysql_fetch_fields(resp);
for (conta=0;conta<mysql_num_fields(resp);conta++) {
printf("%s",(campos[conta]).name);
if (mysql_num_fields(resp)>1)
printf("\t");
}
printf("\n");
//enquanto retonrnar registros, conta até o
//número de colunas que a tabela tem e escreve na
//tela com um tab, depois pula a linha e tenta
//pegar outro registro
while ((linhas=mysql_fetch_row(resp)) != NULL)
{
for (conta=0;conta<mysql_num_fields(resp);conta++)
printf("%s\t",linhas[conta]);
printf("\n");
}
}
mysql_free_result(resp);//limpa a variável do resultado: resp
}
mysql_close(&conexao);
}
else
{
printf("Conexao Falhou\n");
if (mysql_errno(&conexao))
printf("Erro %d : %s\n", mysql_errno(&conexao), mysql_error(&conexao));
}
return 0;
}
só que deu os seguintes erros.
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c" -o "C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
In file included from C:/Dev-Cpp/include/mysql/mysql.h:57,
from C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c:2:
C:/Dev-Cpp/include/mysql/mysql_com.h:175: error: syntax error before "SOCKET"
C:/Dev-Cpp/include/mysql/mysql_com.h:175: warning: no semicolon at end of struct or union
C:/Dev-Cpp/include/mysql/mysql_com.h:208: error: syntax error before '}' token
C:/Dev-Cpp/include/mysql/mysql_com.h:208: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql_com.h:321: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:322: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:323: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:324: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:325: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:326: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:327: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:328: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:331: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:332: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql_com.h:339: error: syntax error before "s"
In file included from C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c:2:
C:/Dev-Cpp/include/mysql/mysql.h:237: error: syntax error before "NET"
C:/Dev-Cpp/include/mysql/mysql.h:237: warning: no semicolon at end of struct or union
C:/Dev-Cpp/include/mysql/mysql.h:262: error: 'scramble' redeclared as different kind of symbol
C:/Dev-Cpp/include/mysql/mysql_com.h:407: error: previous declaration of 'scramble' was here
C:/Dev-Cpp/include/mysql/mysql.h:262: error: 'scramble' redeclared as different kind of symbol
C:/Dev-Cpp/include/mysql/mysql_com.h:407: error: previous declaration of 'scramble' was here
C:/Dev-Cpp/include/mysql/mysql.h:287: error: syntax error before '}' token
C:/Dev-Cpp/include/mysql/mysql.h:287: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:295: error: syntax error before "MYSQL"
C:/Dev-Cpp/include/mysql/mysql.h:295: warning: no semicolon at end of struct or union
C:/Dev-Cpp/include/mysql/mysql.h:304: error: syntax error before '}' token
C:/Dev-Cpp/include/mysql/mysql.h:304: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:322: error: syntax error before "NET"
C:/Dev-Cpp/include/mysql/mysql.h:322: warning: no semicolon at end of struct or union
C:/Dev-Cpp/include/mysql/mysql.h:328: error: conflicting types for 'last_errno'
C:/Dev-Cpp/include/mysql/mysql_com.h:203: error: previous declaration of 'last_errno' was here
C:/Dev-Cpp/include/mysql/mysql.h:331: error: conflicting types for 'last_error'
C:/Dev-Cpp/include/mysql/mysql_com.h:202: error: previous declaration of 'last_error' was here
C:/Dev-Cpp/include/mysql/mysql.h:332: error: syntax error before '}' token
C:/Dev-Cpp/include/mysql/mysql.h:332: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:380: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:381: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:382: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:383: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:385: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:386: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:387: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:389: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:390: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:391: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:392: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:393: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:394: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:395: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:396: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:397: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:398: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:399: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:401: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:401: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:401: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:402: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:405: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:407: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:407: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:413: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:414: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:415: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:416: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:418: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:420: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:420: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:420: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:421: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:421: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:421: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:424: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:426: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:429: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:431: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:433: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:441: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:443: error: `mysql_set_local_infile_handler' declared as function returning a function
C:/Dev-Cpp/include/mysql/mysql.h:444: error: syntax error before "int"
C:/Dev-Cpp/include/mysql/mysql.h:452: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:459: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:460: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:462: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:465: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:466: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:468: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:473: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:476: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:480: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:485: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:488: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:489: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:491: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:492: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:495: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:496: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:497: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:500: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:501: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:502: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:503: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:503: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:503: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:504: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:504: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:504: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:505: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:505: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:505: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:506: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:508: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:509: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:511: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:513: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:515: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:516: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:517: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:518: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:518: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:519: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:524: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:528: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:537: error: syntax error before ')' token
C:/Dev-Cpp/include/mysql/mysql.h:538: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:541: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:541: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:541: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:542: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:542: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:546: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:547: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:548: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:550: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:553: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:651: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:664: error: syntax error before "MYSQL"
C:/Dev-Cpp/include/mysql/mysql.h:664: warning: no semicolon at end of struct or union
C:/Dev-Cpp/include/mysql/mysql.h:687: error: conflicting types for 'last_errno'
C:/Dev-Cpp/include/mysql/mysql.h:328: error: previous declaration of 'last_errno' was here
C:/Dev-Cpp/include/mysql/mysql.h:687: error: conflicting types for 'last_errno'
C:/Dev-Cpp/include/mysql/mysql.h:328: error: previous declaration of 'last_errno' was here
C:/Dev-Cpp/include/mysql/mysql.h:691: error: conflicting types for 'last_error'
C:/Dev-Cpp/include/mysql/mysql.h:331: error: previous declaration of 'last_error' was here
C:/Dev-Cpp/include/mysql/mysql.h:691: error: conflicting types for 'last_error'
C:/Dev-Cpp/include/mysql/mysql.h:331: error: previous declaration of 'last_error' was here
C:/Dev-Cpp/include/mysql/mysql.h:704: error: syntax error before '}' token
C:/Dev-Cpp/include/mysql/mysql.h:704: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:731: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:732: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:739: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:741: warning: no semicolon at end of struct or union
C:/Dev-Cpp/include/mysql/mysql.h:744: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:746: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:747: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:748: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:749: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:750: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:751: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:752: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:753: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:754: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:756: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:759: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:759: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:759: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:760: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:762: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:763: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:764: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:767: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:768: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:769: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:772: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:775: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:776: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:777: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:778: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:779: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:780: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:784: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:784: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:784: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:785: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:785: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:785: warning: data definition has no type or storage class
C:/Dev-Cpp/include/mysql/mysql.h:786: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:787: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:788: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:789: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:791: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:792: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:793: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:794: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:795: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:796: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:798: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:799: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:800: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:801: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:802: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:803: error: syntax error before '*' token
C:/Dev-Cpp/include/mysql/mysql.h:829: error: syntax error before '*' token
C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c: In function `main':
C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c:11: error: syntax error before "conexao"
C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c:12: error: `resp' undeclared (first use in this function)
C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c:12: error: (Each undeclared identifier is reported only once
C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c:12: error: for each function it appears in.)
C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c:18: error: `conexao' undeclared (first use in this function)
Execution terminated
No caso do sqlite3 compilei esse cód.
#include <stdio.h>
#include <stdlib.h>
#include "sqlite3.h"
sqlite3 *db;
int rc;
char buf[255];
int main (int argc, char *argv[])
{
if (argc != 2) {
printf ("Usage: %s file.db\n", argv[0]);
return -1;
}
rc = sqlite3_open (argv[1], &db);
if (rc) {
printf ("Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close (db);
return -1;
}
//---------------------------------------------------------------
//
// cria a tabela ( pessoa ) com 2 colunas ( col0, col1 ) ...
//
// col0: int
// col1: "string"
//
//---------------------------------------------------------------
sprintf (buf, "CREATE TABLE IF NOT EXISTS pessoa(col0 INTEGER, col1 TEXT)");
sqlite3_exec (db, buf, 0, 0, 0);
//---------------------------------------------------------------
//
// primeiro cadastro ...
//
//---------------------------------------------------------------
sprintf (buf, "INSERT INTO pessoa VALUES(1, 'nome_primeira_pessoa')");
sqlite3_exec (db, buf, 0, 0, 0);
sqlite3_close (db);
return 0;
}
e deu esses erros.
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.c" -o "C:\Users\vinicius.CRISTIANO\Desktop\Acessa MySQL\ex1.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\Users\VINICI~1.CRI\AppData\Local\Temp/ccOUbaaa.o(.text+0x65):ex1.c: undefined reference to `sqlite3_open'
C:\Users\VINICI~1.CRI\AppData\Local\Temp/ccOUbaaa.o(.text+0x80):ex1.c: undefined reference to `sqlite3_errmsg'
C:\Users\VINICI~1.CRI\AppData\Local\Temp/ccOUbaaa.o(.text+0x9d):ex1.c: undefined reference to `sqlite3_close'
C:\Users\VINICI~1.CRI\AppData\Local\Temp/ccOUbaaa.o(.text+0xea):ex1.c: undefined reference to `sqlite3_exec'
C:\Users\VINICI~1.CRI\AppData\Local\Temp/ccOUbaaa.o(.text+0x12b):ex1.c: undefined reference to `sqlite3_exec'
C:\Users\VINICI~1.CRI\AppData\Local\Temp/ccOUbaaa.o(.text+0x138):ex1.c: undefined reference to `sqlite3_close'
collect2: ld returned 1 exit status
Execution terminated
Att:Vinícius