[fpc-pascal]RE: SQLite Header File

Peter Vreman peter at freepascal.org
Wed Mar 3 13:15:34 CET 2004


>> > Inconsistency detected by ld.so: dl-minimal.c: 134:
>> > realloc: Assertion `ptr == alloc_last_block' failed!)
>
>> The error you get is because you probably forgot to put 'cmem'
>> as the first unit in your program's uses clause.
>
>
> I'm not sure about SQLite, but i have seen this problem
> using some other libs. Sometimes just putting:
>
>   {$LINKLIB "c" }
>
>  - in the program file stops the error.
>
> I assume this lets the lib use the C routines, and
> the FreePascal side can still use its own.

All bindings that bind to a C library need to include {$linklib c}. When
it is not there it is a bug in the binding. The {$linklib c} is required
to let fpc know that it needs to use special startup code.







More information about the fpc-pascal mailing list