I just started learning Free Pascal and I wrote this fairly basic program to practise arrays. I get two errors:
Strings.lpr(32,1) Error: Undefined symbol: THREADVARLIST_STRINGS
Strings.lpr(32,1) Error: Undefined symbol: STRINGS_STRPAS$PCHAR$$SHORTSTRING
Strings.lpr(32,1) Fatal: There were 2 errors compiling module, stopping
The code is as follows:
program Strings;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils
{ you can add units after this };
{$R *.res}
var
Marks : array [1..10] of Integer;
index : Integer;
begin
for index:= 0 to 10 do
begin
write('Enter mark of student ',index,': ');
readln(marks[index]);
end;
for index := 0 to 10 do
begin
write('Student No. ',index,' Marks: ',marks[index],' ');
if marks[index]>65 then writeln('PASS')
else writeln('FAIL');
end;
writeln('Press any key to continue.');
readln;
end. {line 32}
Don’t name your program strings. There is a precompiled unit with that name.
In general means that you create a mainprogram but don’t link a proper RTL.
Possible causes: