SqliteTable3.pas doesn't compile (Win32, D10Seattle Enterprise)
There are some compilation problems (at least in my machine) with unit SQLiteTable3.pas. Try to include it in your project as following...
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
SqliteTable3;
begin
try
{ TODO -oUser -cConsole Main : Insert code here }
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.
...and you will get the followings:
[dcc32 Error] SQLiteTable3.pas(169): E2003 Undeclared identifier: 'TSQLiteActionCode'
[dcc32 Error] SQLiteTable3.pas(171): E2005 'TSQLiteActionCode' is not a type identifier
This is because the following conditionals are defined early in the same unit
{$IFNDEF MSWINDOWS}
{$DEFINE USE_SYSTEM_SQLITE}
{$ENDIF}
//then some lines after
{$IFDEF USE_SYSTEM_SQLITE}
type
TSQLiteActionCode = type Integer;
I'd like to use Firebird and SQLite in my test project, however, I had to remove the SqliteTable3 unit in my uses list to compile it. However, removing the IFDEF (so that the USE_SYSTEM_SQLITE is always defined) seems to work.
Comments (7)
-
repo owner -
reporter To let the unit compiles I've to change this
{$IFNDEF MSWINDOWS} {$DEFINE USE_SYSTEM_SQLITE} {$ENDIF}
in this
{.$IFNDEF MSWINDOWS} {$DEFINE USE_SYSTEM_SQLITE} {.$ENDIF}
so, in other words, I've to define USE_SYSTEM_SQLITE
-
repo owner Make sure you are using the correct SQLite3.pas as well. Because then everything needed is declared.
-
repo owner - marked as major
Were you able to identify the source of the problem yet?
-
reporter Just checked. I had another Sqlite3.pas in the path, derived from the same Tim Anderson wrapper. Removing that path, all its ok. Thank you Stefan.
-
repo owner - changed status to closed
-
repo owner - changed version to 1.2
- Log in to comment
I cannot reproduce. On Win32 it should not define USE_SYSTEM_SQLITE but even if I manually set that define it compiles just fine.
If you remove the IFDEF then USE_SYSTEM_SQLITE is not defined.