私はiPhone用のsqliteを学ぼうとしており、このリンクのチュートリアルを使用しています:
http://www.techotopia.com/index.php/An_Example_SQLite_based_iPhone_Application
シングル ビュー アプリケーションを作成し、チュートリアルのコードを viewcontroller.h および .m ファイルにコピーしました。チュートリアルの各セクションの後、コードをコンパイルして、まだ機能していることを確認しました。「データベースとテーブルの作成」セクションでコピーした後、最初にエラーが発生します。次のエラーが表示されます。
Undefined symbols for architecture i386:
"_sqlite3_open", referenced from:
-[ViewController viewDidLoad] in ViewController.o
"_sqlite3_exec", referenced from:
-[ViewController viewDidLoad] in ViewController.o
"_sqlite3_close", referenced from:
-[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
私は無数のフォーラムを検索し、多くのことを試しました。libsqlite3.dylib と libsqlite3.0.dylib をインポートしました。私はxcode 4.2を使用しています。sqlite フレームワークに関連しているようですが、修正方法がわかりません。
あなたが提供できるどんな助けも大歓迎です。
ありがとう、
イアン