2
我正在寫一個C++程序,使用SQLite的數據庫。對於這行代碼;SQLite不完整類型錯誤
void testRun()
{
// some code here
sqlite3_stmt stmt;
// some code here too
}
我碰到下面的錯誤;
error: aggregate 'sqlite3_stmt stmt' has incomplete type and cannot be defined
sqlite3_stmt stmt;
^
我正在使用合併的SQLite源代碼幷包含「sqlite3.h」。究竟是什麼原因導致了這個錯誤,怎麼解決? 我在Windows 7 64位上,使用MinGW_64。
我從來沒有使用的SQLite直接從C庫,但我想,它的類型並不意味着直接實例化,但是你必須只保留不透明的指針(比如你使用'FILE *')。 –
請參閱http://stackoverflow.com/questions/10978020/compiling-sqlite-for-windows-64-bit –