ios - "_sqlite3_key"未找到架构 i386 的符号
<p><p>您好,我使用这个 SQLCipher(<a href="http://sqlcipher.net/ios-tutorial/" rel="noreferrer noopener nofollow">http://sqlcipher.net/ios-tutorial/</a>) 来加密我的 sqlite,但是当我编译时遇到了这个错误</p>
<pre><code> "_sqlite3_key", referenced from:
- in LCAppDelegate.o
Symbol(s) not found for architecture i386
</code></pre>
<p>当我在 AppDelegate 中使用此代码时发生这种情况</p>
<pre><code>#import <sqlite3.h>
...
NSString *databasePath = [
stringByAppendingPathComponent: @"sqlcipher.db"];
sqlite3 *db;
if (sqlite3_open(, &db) == SQLITE_OK) {
const char* key = [@"BIGSecret" UTF8String];
sqlite3_key(db, key, strlen(key));
if (sqlite3_exec(db, (const char*) "SELECT count(*) FROM sqlite_master;", NULL, NULL, NULL) == SQLITE_OK) {
// password is correct, or, database has been initialized
} else {
// incorrect password!
}
sqlite3_close(db);
}
</code></pre>
<p>有人知道如何解决这个问题吗?请帮帮我!!!</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>你没有为 i386 编译它——看教程</p>
<p>将 i386 添加到有效的拱门和要构建的拱门中。</p>
<h2> <img src="/image/lWQ64.png" alt="enter image description here"/> </h2>
<p>=> 只有 SIMULATOR 是 i386</p></p>
<p style="font-size: 20px;">关于ios - "_sqlite3_key"未找到架构 i386 的符号,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/22512614/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/22512614/
</a>
</p>
页:
[1]