Reputation: 3224
I'm total noob in VS usage, especially in 6.0 version. I want to create first project in C++ that uses sqlite library. Firstly I downloaded *.dll file from here. Now I want to use its library in project. Here's my simple code:
#include "stdafx.h"
#include <stdio.h>
#include <sqlite3.h>
int main(int argc, char* argv[])
{
printf("Hello World!\n");
return 0;
}
How can I add this *.dll file to make sqlite3.h file visible?
UPDATE 1
I downloaded amalgamation file and added *.c and *.h file to project like that:
But I'm getting errors and many of warnings:
--------------------Configuration: DBApp - Win32 Debug--------------------
Compiling...
StdAfx.cpp
Compiling...
DBApp.cpp
C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\MOJE DOKUMENTY\POBIERANIE\DBApp\DBApp.cpp(6) : fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory
Generating Code...
Compiling...
sqlite3.c
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(238) : warning C4005: 'SQLITE_DEFAULT_PAGE_SIZE' : macro redefinition
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(234) : see previous definition of 'SQLITE_DEFAULT_PAGE_SIZE'
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(253) : warning C4005: 'SQLITE_MAX_DEFAULT_PAGE_SIZE' : macro redefinition
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(249) : see previous definition of 'SQLITE_MAX_DEFAULT_PAGE_SIZE'
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(283) : warning C4005: 'SQLITE_MAX_TRIGGER_DEPTH' : macro redefinition
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(281) : see previous definition of 'SQLITE_MAX_TRIGGER_DEPTH'
...
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(105419) : warning C4005: 'MIN' : macro redefinition
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(45386) : see previous definition of 'MIN'
c:\documents and settings\administrator\moje dokumenty\pobieranie\sqlite-src\sqlite3.c(108807) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Generating Code...
Error executing cl.exe.
DBApp.exe - 2 error(s), 232 warning(s)
Upvotes: 1
Views: 1233
Reputation: 14873
You have to add some path to your VisualC6 project (DBApp.dsp)
Includes, like this to include Java 7 includes (it's an example, you don't need Java) :
And the libraries, again an example with Java VM (jvm.lib/dll)
To show this dialog press Alt-F7
Upvotes: 1