簡體   English   中英

使用C ++ Builder 5編譯sqlite數據庫時出錯

[英]Errors with compiling sqlite database with c++ builder 5

我在嘗試使用C ++ Builder 5代碼編譯sqlite數據庫時遇到麻煩。

我下載了sqlite-amalgamation,並將所有文件添加到項目中:

shell.c
sqlite3.c
sqlite3.h
sqlite3ext.h

然后,我在將使用數據庫的MainForm中包含了sqlite3.h

首先,我認為這是我的代碼出現問題,但是在使用帶有DBGrid的簡單Form進行測試以顯示數據庫中的數據之后,出現了以下錯誤:

[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的Internet教程,但是它們不起作用。

如果無法在C ++ Builder 5中使用sqlite,是否還有另一個與其兼容的嵌入式數據庫?

聽說可以將CSV文件用作數據庫了,可以嗎? 如果是這樣,怎么辦?

該文件shell.c用於命令行shell 您不需要它即可從您的代碼訪問數據庫。

您所需的唯一文件是sqlite3.csqlite3.h ,實際上只有前一個文件需要編譯

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM