简体   繁体   English

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

[英]Visual Studio 2013 crashes when compiling Sqlite C++ library

I'm having an absolute nightmare of a time trying to get the Sqlite C++ library to compile in Visual Studio 2013 Ultimate (Compiles fine in VS2012). 我在一次绝对的噩梦中试图让Sqlite C ++库在Visual Studio 2013 Ultimate中进行编译(在VS2012中编译良好)。

Basically regardless of whether I try to perform a clean or a rebuild VS will claim to successfully finish but will subsequently freeze and become unresponsive, never to recover. 基本上,无论我尝试执行清理还是重建,VS都会声称已成功完成,但随后将冻结并变得无响应,再也无法恢复。

Here is the output 这是输出

产量

and here is the actual VS project. 是实际的VS项目。

Anyone care to give it a crack and see if they are running into the same problem or provide any suggestions? 是否有人愿意给它一个裂缝,看看他们是否遇到相同的问题或提供任何建议?

Tim Heuer gives step by step instructions ON THIS LINK . Tim Heuer 在此链接上提供了逐步说明。 The batch files are hardcoded for TCL 8.5, you'll save yourself some time if you don't download the latest (8.6) 批处理文件针对TCL 8.5进行了硬编码,如果不下载最新版本(8.6),则可以节省一些时间。

EDITED - I successfully compiled SQLite with Tim's steps (I just reinstalled Windows 8.1 / VS 2013). 编辑-我已经按照Tim的步骤成功编译了SQLite(我刚刚重新安装了Windows 8.1 / VS 2013)。 Note: the only issue I encountered was taking the steps to literally, be sure to change into the newly created SQLite directory before running the fossil command. 注意:我遇到的唯一问题是按照字面上的步骤进行操作,在运行化石命令之前,请确保更改为新创建的SQLite目录。

FYI for WinRT, be sure to use the correct path, if you just specify the filename you will get an access denied error (which will surface as a "cannot open database" error). FYI for 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);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM