現在我歌廳一個錯誤:SQLite3對象不明白?
1> C:\發展\ document_manager \ document_manager \ storage_manager.h(7):錯誤C2079: 'storage_manager ::分貝' 使用未定義結構 '的sqlite3'
與
#pragma once
#include "sqlite3.h"
class storage_manager
{
sqlite3 db;
sqlite3** db_pp;
public:
void open()
{
sqlite3_open("data.db", db_pp);
}
};
老問題: 大家好。我從http://www.sqlite.org/download.html下載了sqlite-amalgamation-3_6_13.zip,但我無法在我的項目中進行編譯。我收到許多錯誤,如:
c:\pathtoproject\sqlite3.c(11337) : error C2440: '=' : cannot convert from 'void *' to 'char *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
c:\pathtoproject\sqlite3.c(12023) : error C2440: '=' : cannot convert from 'void *' to 'sqlite3_int64 *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
我需要做什麼來正確編譯我的項目?謝謝!
編輯: 我不想將整個程序編譯爲C,我只想編譯三個文件爲c,這可能嗎?
編輯:修復!我創建了一個新項目。
我不想把整個程序編譯爲C,我只是想編譯三個文件作爲c,這可能嗎? – 2009-04-23 21:35:31
是的,檢查我的答案。您可以指定要編譯爲C的單個文件,它不必是項目範圍的。 – jalf 2009-04-23 22:02:30