Beatopcoder 2014-01-03
apt-get install sqlite sqlite3
sqlite3 test.db .database .exit
apt-get install libsqlite3-dev
#include<sqlite3.h> #include<stdlib.h> #include<stdio.h> int main(int argc, char **argv) { sqlite3_os_init(); char* filename = "hyx.db"; sqlite3 *db = NULL; int rc; rc = sqlite3_open(filename, &db); if (rc) { } else { printf("open sqlite file %s succeed;", filename); } return 1; }
gcc main.c
gcc main.c -lsqlite