VC连接SQLite数据库,用的CppSQLite类,编译出现异常
VC连接SQLite数据库,用的CppSQLite类,编译出现错误
1>d:\documents and settings\administrator\我的文档\visual studio 2005\projects\s1\s1\cppsqlite3.cpp(1589) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
其它的感觉都没什么问题,为什么这个类报错?我添加了#include “stdafx.h”报错更多,
------解决思路----------------------
放到另外一个工程中编译成动态库试试,或者用ADO,换下连接字符串就可以了,其他的操作都差不多。
------解决思路----------------------
在cppsqlite3.cpp文件的最头部,即第一行写#include "stdafx.h"试试。
不行的话在项目-XX属性- C/C++ - 预编译头-预编译头设置为“不使用预编译头”
1>d:\documents and settings\administrator\我的文档\visual studio 2005\projects\s1\s1\cppsqlite3.cpp(1589) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
其它的感觉都没什么问题,为什么这个类报错?我添加了#include “stdafx.h”报错更多,
------解决思路----------------------
放到另外一个工程中编译成动态库试试,或者用ADO,换下连接字符串就可以了,其他的操作都差不多。
------解决思路----------------------
在cppsqlite3.cpp文件的最头部,即第一行写#include "stdafx.h"试试。
不行的话在项目-XX属性- C/C++ - 预编译头-预编译头设置为“不使用预编译头”