gpt4 book ai didi

c++ - 将Sqlite3添加到项目错误C1853预编译头文件来自以前的版本

转载 作者:行者123 更新时间:2023-11-30 16:36:41 25 4
gpt4 key购买 nike

我正在开发一个项目 VS2015 x64 非托管 cpp我将 sqlite3.c、sqlite3.h 添加到项目中并构建。我收到这条消息。

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)

我已经阅读了有关此内容并尝试了我所看到的所有内容,但总是出现相同的错误。我将项目更改为“不使用预编译头 - 同样的错误”并且重新生成了 pch。我什至卸载并重新加载该项目。我尝试挑选出 sqlite3.c 文件并更改其中的属性,但再次出现同样的错误。在每次尝试之间,我都会清理项目并重建。我已经无计可施了,已经玩了 90 分钟了。

建议?

最佳答案

您需要将库 - sqlite3.lib 添加到您的项目中作为附加依赖项。

可以通过从 https://www.sqlite.org/download.html 下载Windows 预编译二进制文件来创建该库。 。

这篇文章提供了如何包含它的分步过程。 https://dcravey.wordpress.com/2011/03/21/using-sqlite-in-a-visual-c-application/

关于c++ - 将Sqlite3添加到项目错误C1853预编译头文件来自以前的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48314004/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com