今天在加數(shù)據(jù)庫(kù)的相關(guān)操作時(shí),遇到了一些問(wèn)題,提示
error C3861: 'CeMountDBVolEx': identifier not found
error C3861: 'CeMountDBVolEx': identifier not found
error C3861: 'CeCreateDatabaseWithProps': identifier not found
error C3861: 'CeCreateSession': identifier not found
error C3861: 'CeOpenDatabaseInSession': identifier not found
我在.cpp文件的開(kāi)頭加入了
#define EDB
#include <windows.h>
#include <windbase.h>
但是錯(cuò)誤還依然存在
從網(wǎng)上搜索了一些方法
在博文《mobile數(shù)據(jù)庫(kù)遇到的問(wèn)題》
http://blog.sina.com.cn/s/blog_4c5ad0740100cvxg.html
它里面建議使用
extern "C"
{
#include <windbase_edb.h>
}
但是使用后,問(wèn)題變成了lnk的錯(cuò)誤
error LNK2019: unresolved external symbol
有人在論壇里建議
#include Windbase_edb.h
也是同樣的問(wèn)題
最后,我問(wèn)了一下我的同事
他建議我在
stdafx.h 頭文件中添加
#define EDB
#include <windows.h>
#include <windbase.h>
這樣的確解決了問(wèn)題。
posted on 2009-02-04 13:20
Sandy 閱讀(503)
評(píng)論(0) 編輯 收藏 引用 所屬分類(lèi):
windows學(xué)習(xí)