0

how to add sqlite3.h, sqlite3.dll files in VS2017 in c++ in project directory

E1696 cannot open source file "sqlite3.h"

hannu
  • 1
  • 1

1 Answers1

1

You could follow the steps below to add .h and dll.

  1. Add .h: Properties -> C/C++ -> General -> Additional Include Directories

  2. Add dll: select Properties->Build Events->Post-Build Event->Command Line and input copy $(TargetPath) $(TargetDir)..\..\someFolder\myoutput.dll regasm $(TargetPath)

If you have the lib, you could refer to the steps below:

Add lib: Properties->Linker->General->Additional Library Directories

    `Properties->Linker->Input->Additional Dependencies`

If you don’t have the lib, you could link explicitly to a DLL.

  • Call LoadLibraryEx or a similar function to load the DLL and obtain a module handle.
  • Call GetProcAddress to obtain a function pointer to each exported function that the application calls. Because applications call the DLL functions through a pointer, the compiler doesn't generate external references, so there's no need to link with an import library. However, you must have a typedef or using statement that defines the call signature of the exported functions that you call.
  • Call FreeLibrary when done with the DLL.

Also, you could refer to this link for more information.

Barrnet Chou
  • 1,738
  • 1
  • 4
  • 7