Bonjour à tous, je re-débute en C/C++ et je tente actuellement de recompiler SQLite pour Visual Studio C++ 6 selon les indications disponibles ici http://www.sqlite.org/cvstrac/wiki?p=HowToCompile section : MSVC and SQLite DLL, mais sans succès.
Je suis en mesure d'obtenir une DLL mais lorsque je créé un petit prog test :
et que je tente de faire mon build le tout j'obtiens :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 #include <stdio.h> #include <stdlib.h> #include <sqlite3.h> static int callback(void *NotUsed, int argc, char **argv, char **azColName){ int i; for(i=0; i<argc; i++){ printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL"); } printf("\n"); return 0; } int main(int argc, char **argv){ sqlite3 *db; char *zErrMsg = 0; int rc; if( argc!=3 ){ fprintf(stderr, "Usage: %s DATABASE SQL-STATEMENT\n", argv[0]); exit(1); } rc = sqlite3_open(argv[1], &db); if( rc ){ fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db)); sqlite3_close(db); exit(1); } rc = sqlite3_exec(db, argv[2], callback, 0, &zErrMsg); if( rc!=SQLITE_OK ){ fprintf(stderr, "SQL error: %s\n", zErrMsg); } sqlite3_close(db); return 0; }
Est-ce que quelqu'un peut m'apporter aide et conseils?--------------------Configuration: test_SQLite - Win32 Release--------------------
Linking...
test_SQLite.obj : error LNK2001: unresolved external symbol _sqlite3_exec
test_SQLite.obj : error LNK2001: unresolved external symbol _sqlite3_close
test_SQLite.obj : error LNK2001: unresolved external symbol _sqlite3_errmsg
test_SQLite.obj : error LNK2001: unresolved external symbol _sqlite3_open
Release/test_SQLite.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
test_SQLite.exe - 5 error(s), 0 warning(s)
Merci d'avance
Partager