[fpc-pascal] Compiling for SPARC

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Aug 14 15:41:45 CEST 2006


On 14 aug 2006, at 15:33, Jonas Maebe wrote:

> I'm not sure where exactly 119 fits in here, unless length(binstr)  
> (full path to your copy of ar) around 120 chars or so.

I forgot to add some more relevant code:

       Replace(cmdstr,'$LIB',maybequoted 
(current_module.staticlibfilename^));
       { create AR commands }
       success := true;
       nextcmd := cmdstr;
       current := TStringListItem(SmartLinkOFiles.First);
       repeat
         Replace(nextcmd,'$FILES',GetNextFiles(240 - length(nextcmd)  
+ 6 - length
(binstr) - 1, current));
         success:=DoExec(binstr,nextcmd,false,true);
         nextcmd := cmdstr;
       until (not assigned(current)) or (not success);

The first replace already puts the library name in the string. So if  
the directory + name of that library (which always is in a subdir of  
the unit output directory) is around 120 chars, things do add up.

Not sure how to fix this properly though, except by finally doing  
that whole "replace Dos and shortstrings with Sysutils and  
ansistrings for all external interfacing in the compiler" thing.


Jonas



More information about the fpc-pascal mailing list