0

I am working on a project VS2015 x64 unmanaged cpp I added sqlite3.c, sqlite3.h to the project and build. I get this message.

sqlite Error C1853 precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)

I have read about this and have tried everything I have seen but always the same error. I changed the project to Not using pre compiled headers - same error and the pch gets regenerated. I even unloaded and reloaded the project. I tried to single out the sqlite3.c file and change the properties there but again - same error. Between each try I clean the project and rebuild. I am my wits end and have been playing with this for 90 minutes.

Suggestions?

Jeff
  • 2,061
  • 4
  • 27
  • 45
  • 1
    Did you delete the Debug and Release folders and have it rebuild? – drescherjm Jan 18 '18 at 04:56
  • Yes I did. I FINALLY looked at the project as I could ego and view the text. Saw that it still said use precompiled headers. Manually changed it and it worked. Must be a visual studio bug. – Jeff Jan 18 '18 at 05:21

1 Answers1

1

You need to add the library - sqlite3.lib to your project as an additional dependency.

The library can be created by downloading Precompiled Binaries for Windows from https://www.sqlite.org/download.html.

This post gives a step by step process on how to include it. https://dcravey.wordpress.com/2011/03/21/using-sqlite-in-a-visual-c-application/

Achi
  • 141
  • 1
  • 4