1. Go to the SQLite download page.
2. Download and extract sqlite-amalgamation-3_6_14_2.zip
3. Move or copy sqlite3.h and sqlite3.c to your desired header and source directories, respectively.
4. Add sqlite3.h and sqlite3.c as header and source files respectively to your Visual Studio project.
5. Include sqlite3.h as necessary and write your program.
6. Build your project.
C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + Bazaar
Thanks. I could get it compiled without any errors. I was previousely using one of the codeproject wrapper class where I need to have the dll on the folder. But, opening the database and handling was easy.
Is there any further samples available on how to open a sample database and execute a query? It will be of great help if I can get a small bit of sample.
Is there any further samples available on how to open a sample database and execute a query? It will be of great help if I can get a small bit of sample.
You should check out the documentation on the SQLite website.
C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + Bazaar
I was trying to use sqlite library as well.
I follow you instruction by adding in the 2 file sqlite3.h and sqlite3.c to my project.
But i get this compilation error:
[QUOTE]
all the function in sqlite3 is getting the marco redefinition error.
[\QUOTE]
compilation message
1 error(s), 255 warning(s)
The error message is: fatal error C1010 : unexpected end of file while looking for precompiled header directive
what actually when wrong?
How can i solve this problem
actually i try another way to create the lib file by using the sqlite3.def and sqlite3.dll
from the internet, i find a command that show me how to generate the lib file
from the command promt
C:\>LIB /def:sqlite3.def
but also getting error. please refer to attachment.
How can i use sqlite library? is there any other way?
Thanks
Last edited by VbEndUser; January 29th, 2012 at 12:21 AM.
The error message is: fatal error C1010 : unexpected end of file while looking for precompiled header directive
what actually when wrong?
How can i solve this problem
If you don't need pre-compiled headers, maybe the simple solution here is to just disable the feature.
C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + Bazaar
yes. I have disable the pre-compiled headers and the compilation is successful.
i just not understand the usage of the pre-compiled headers.
another question here is how can i create the lib file for the sqlite3?
using def and dll only?
as i mention in my previous post, i try to use the LIB.exe but still cannot.
Have you try to compile the sqlite3.lib?
Thanks.
... i find a command that show me how to generate the lib file
from the command promt
C:\>LIB /def:sqlite3.def
but also getting error. please refer to attachment.
Well, according to MSDN from October 2000:
Linker Tools Error LNK1104 cannot open file "filename"
The tool could not open the given file.
Tips
One of the following may be a cause:
There was not enough disk space.
The file does not exist.
The filename or its path was incorrectly specified.
The specified drive is invalid.
The file does not have the appropriate permissions.
The path for filename expands to more than 260 characters.
If the given file is named LNKn, which is a filename generated by the linker for a temporary file, then the directory specified in the TMP environment variable may not exist, or more than one directory is specified for the TMP environment variable. (Only one directory path should be specified for the TMP environment variable.)
If the error occurs on the executable filename, an earlier version of the executable may still be running. You will need to terminate the executable before linking it. In Windows NT or Windows 95 you can use the utility PVIEW to look for and kill instances of the application. PVIEW.EXE is shipped with Visual C++.
If the error message occurs for a library name, and you recently ported the .MAK file from a previous Microsoft Visual C++ development system, the library may no longer be valid. Ensure that the library still exists in this circumstance.
Did you check whehter this file sqlite3.def really exists on the drive c:\?
I copy both the file sqlite3.def and sqlite.dll to the LIB.exe folder
(C:\Program Files\Microsoft Visual Studio\VC98\Bin).
I did not copy to the c:/ path
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.