使用 c++ 生成器编译 sqlite 数据库时出错 5.
Errors with compiling sqlite database with c++ builder 5
我在尝试使用 C++Builder 5 代码编译 sqlite 数据库时遇到问题。
我下载了sqlite-amalgamation,并将所有文件添加到项目中:
shell.c
sqlite3.c
sqlite3.h
sqlite3ext.h
然后,我将sqlite3.h
包含在将使用数据库的 MainForm 中。
首先,我认为是我的代码有问题,但是在使用带有DBGrid的简单表单对其进行测试以显示数据库中的数据后,我收到以下错误:
[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 的互联网教程,但它们不起作用。
如果无法将sqlite与C++Builder 5一起使用,是否有另一个与之兼容的嵌入式数据库?
我听说我可以使用 CSV 文件作为数据库,我可以这样做吗?如果是这样,如何?
文件shell.c
用于命令行 shell;您不需要它来从代码访问数据库。
您唯一需要的文件是sqlite3.c
和sqlite3.h
,实际上只需要编译前者。
相关文章:
- 查询SQLite数据库中的日期
- 访问者访问变体并返回不同类型时出错
- 在Linux for Windows上编译C++代码时出错
- 读取文件的最后一行并输入到链接列表时出错
- 重载操作程序时出错>>用于类中的字符串 memebr
- 调用专用模板时出错"no matching function for call to [...]"
- C++-试图将函数指针推回到另一个CPP文件中的矢量时出错
- LINK 尝试使用 OpenSSL evp aes 256 c++ 时出错
- 在Google Kick start中提交时出错
- 使用 SQlite 在 QT5 上关闭和打开数据库时出错
- 尝试打开 SQLite3 数据库时出错
- 使用 cmake 在窗口上编译 c++ 数据库时出错
- 在 C++ 中包含库数据库.txt文件时出错
- 使用 c++ 生成器编译 sqlite 数据库时出错 5.
- 使用 C++ 打开 SQLite 数据库时出错
- 在Visual Studio c++中访问程序数据库出错
- 在c++程序中连接access数据库时出错
- (Neessitas)Microsoft sql数据库访问在打开时出错
- GetInterface()!=0写入数据库表时出错
- 在c++项目中包含数据库文件时出错