gpt4 book ai didi

c++ - 编译 Sqlite C++ 库时 Visual Studio 2013 崩溃

转载 作者:太空宇宙 更新时间:2023-11-04 11:46:02 29 4
gpt4 key购买 nike

我有一段时间试图让 Sqlite C++ 库在 Visual Studio 2013 Ultimate 中编译(在 VS2012 中编译良好),这真是一场噩梦。

基本上,无论我是尝试执行清理还是重建,VS 都会声称已成功完成,但随后会卡住并变得无响应,永远无法恢复。

这是输出

Output

here是实际的VS项目。

有没有人愿意尝试一下,看看他们是否遇到了同样的问题或提供了任何建议?

最佳答案

Tim Heuer 给出了分步说明 ON THIS LINK .批处理文件针对 TCL 8.5 进行了硬编码,如果您不下载最新的 (8.6),您将节省一些时间

已编辑 - 我按照 Tim 的步骤成功编译了 SQLite(我刚刚重新安装了 Windows 8.1/VS 2013)。注意:我遇到的唯一问题是按字面意思执行步骤,确保在运行 fossil 命令之前切换到新创建的 SQLite 目录。

仅供引用,对于 WinRT,请确保使用正确的路径,如果您只指定文件名,您将收到拒绝访问错误(这将显示为“无法打开数据库”错误)。

using namespace Windows::Storage;
using namespace std;

void SqliteWrapper::RunTest(void)
{
sqlite3 *db;
int rc;

auto path = ApplicationData::Current->LocalFolder->Path+"\\MyDatabase.db";
string dataPath(path->Begin(), path->End());
rc = sqlite3_open(dataPath.c_str(), &db);

if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
}

sqlite3_close(db);
}

关于c++ - 编译 Sqlite C++ 库时 Visual Studio 2013 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19808234/

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