首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用c++ builder 5编译sqlite数据库时出现的错误

用c++ builder 5编译sqlite数据库时出现的错误
EN

Stack Overflow用户
提问于 2018-05-06 00:49:27
回答 1查看 183关注 0票数 0

我很难用C++Builder 5代码编译sqlite数据库。

我下载了sqlite合并,并将所有文件添加到项目中:

代码语言:javascript
复制
shell.c
sqlite3.c
sqlite3.h
sqlite3ext.h

然后,我将sqlite3.h包含在将使用数据库的MainForm中。

首先,我认为有问题的是我的代码,但是在用一个简单的DBGrid表单测试它以显示数据库中的数据之后,我得到了以下错误:

代码语言:javascript
复制
[C++ Warning] shell.c(205): W8065 Call to function '_setmode' with no                           prototype
[C++ Warning] shell.c(209): W8065 Call to function '_setmode' with no prototype 
[C++ Error] shell.c(1420): E2257 , expected
[C++ Error] shell.c(1432): E2141 Declaration syntax error
[C++ Error] shell.c(1432): E2139 Declaration missing ;
[C++ Warning] shell.c(1432): W8004 'RC' is assigned a value that is never used
[C++ Error] shell.c(1432): E2190 Unexpected }
[C++ Error] shell.c(1460): E2040 Declaration terminated incorrectly
[C++ Error] shell.c(1460): E2141 Declaration syntax error
[C++ Error] shell.c(1460): E2141 Declaration syntax error
[C++ Error] shell.c(1729): E2190 Unexpected }
[C++ Error] shell.c(1729): E2190 Unexpected }
[C++ Warning] shell.c(2382): W8053 '_chmod(const signed char *,int,...)' is obsolete
[C++ Warning] shell.c(2504): W8065 Call to function 'S_ISLNK' with no prototype
[C++ Warning] shell.c(2529): W8065 Call to function 'S_ISLNK' with no prototype
[C++ Error] shell.c(2558): E2139 Declaration missing ;
[C++ Error] shell.c(2638): E2451 Undefined symbol 'pDir'
[C++ Error] shell.c(2638): E2451 Undefined symbol 'pDir'
[C++ Warning] shell.c(2638): W8065 Call to function 'closedir' with no prototype
[C++ Error] shell.c(2701): E2451 Undefined symbol 'pDir'
[C++ Warning] shell.c(2701): W8065 Call to function 'opendir' with no prototype
[C++ Error] shell.c(2702): E2451 Undefined symbol 'pDir'
[C++ Error] shell.c(2710): E2451 Undefined symbol 'pDir'
[C++ Warning] shell.c(2710): W8065 Call to function 'readdir' with no prototype
[C++ Warning] shell.c(2710): W8069 Nonportable pointer conversion
[C++ Error] shell.c(2712): E2451 Undefined symbol 'd_name'
[C++ Error] shell.c(2713): E2451 Undefined symbol 'd_name'
[C++ Error] shell.c(2713): E2451 Undefined symbol 'd_name'
[C++ Error] shell.c(2714): E2451 Undefined symbol 'd_name'
[C++ Error] shell.c(2717): E2451 Undefined symbol 'd_name'
[C++ Error] shell.c(2725): E2451 Undefined symbol 'pDir'
[C++ Warning] shell.c(2725): W8065 Call to function 'closedir' with no prototype
[C++ Error] shell.c(2727): E2451 Undefined symbol 'pDir'
[C++ Warning] shell.c(8794): W8072 Suspicious pointer arithmetic
[C++ Warning] shell.c(15699): W8065 Call to function '_isatty' with no prototype
[C++ Warning] shell.c(15700): W8065 Call to function '_isatty' with no prototype

有什么问题吗?

我学习了关于如何添加sqlite的网络教程,但是它们不起作用。

如果无法在C++Builder 5中使用sqlite,那么是否还有另一个与其兼容的嵌入式数据库?

我听说我可以用CSV文件作为数据库,我能这样做吗?如果是这样的话,是怎么做的?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-05-06 05:26:07

shell.c文件是用于命令行外壳的;您不需要它从代码中访问数据库。

您唯一需要的文件是sqlite3.csqlite3.h,而只有前者实际上需要是编译好的

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50195309

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档