[fpc-devel]Problem to open an File

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Tue Sep 3 14:03:59 CEST 2002


Hello Armin,

Tuesday, September 03, 2002, 9:19:00 AM, you wrote:

>> > I Have write the function (using ppc386 on WIN2000 System):
>> >
>> > function GetMessData: integer;
>> > type
>> >   pak = record
>> >       werte : String[23];
>> >   end;
>> >
>> >   PakFile = file of pak;
>> >
>> > var
>> >    i : integer;
>> >    F : PakFile;
>> >
>> > begin
>> >
>> >   Assign(F,'C:\Temp\amag.txt');
>> >   Reset(F);
>> >
>> >
>> > end;
>> >
>> > In the moment, there are not more line in the code of this function.
>> > compiling is ok.
>> > but the linker send the error:
>> > -:link.res: file format not recognized; treating as linker script
>> > -:link.res:1: parse error
>> > unwucht.pp(165,1) ERROR: ERROR while linking
>> > Closing script ppas.bat
>> 
>> Please include the link.res also
>> 
AR> The line

AR> {$I LINK.RES} dosnt work

AR> link.res(1,1) Fatal: Syntax error, BEGIN expected but identifier
AR> SEARCH_DIR found

AR> _______________________________________________
AR> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
AR> http://lists.freepascal.org/mailman/listinfo/fpc-devel

What is your link.res which you try to include using $i compiler
directive? If it is a normal pascal include file, you have
a names collision: FPC generates before calling of linker a linker
response file named also link.res. Of course, this link.res is not a
pascal source but is written in linker script language and, BTW, can
begin from SEARCH_DIR keyword. Try to rename your link.res to prevent
this file name conflict. BTW, .res extension is: 1) not typical for
pascal include files; 2) typical for Windows resource files - that
is a note for FPC developers team...

-- 
Best regards,
 Pavel                            mailto:pavel at insect.mail.iephb.ru







More information about the fpc-devel mailing list